blob: e303a936eb03d198a812e24c9bd91bf8a50416e0 [file] [log] [blame]
<map name="map">
<area shape="rect" coords="0,0,100,100" href="#">
</map>
<img id="target" style="width: 200; height: 200; border: solid black;" usemap="#map">
<p>
This box should turn green when hovered, except when the pointer is over the
top left quarter.
</p>
<p id="result"></p>
<script>
var target = document.getElementById("target");
target.addEventListener("mouseover", function(event) {
event.target.style.backgroundColor = "green";
document.getElementById("result").innerHTML = "Green";
}, true, false);
target.addEventListener("mouseout", function(event) {
event.target.style.backgroundColor = "";
document.getElementById("result").innerHTML = "Not green";
}, true, false);
if (window.eventSender) {
testRunner.dumpAsText();
document.body.offsetTop;
eventSender.mouseMoveTo(150, 150);
}
</script>