JSFiddle - React, Tailwind, and code Playground

by dmethvin

HTML

<h1>isDefaultPrevented test</h1>
<p>Mouse over the following area and view the log</p>
<div id="demo">
<a href="/"><img id="x" src="http://static.flowplayer.org/tools/img/photos/1.jpg" /></a>
<div id="log"></div>
</div>

CSS

h1
{
    font-size: 2em;
    font-weight: bold;
}
.x
{
    width: 100px;
    height: 50px;
    background: #f00;
    margin: 1em;
}

JavaScript

document.getElementById("x").addEventListener("mouseover", function(e){
   document.getElementById("log").appendChild(
      document.createTextNode(" "+ e.getPreventDefault())
   );
   console.log(e);
}, false);