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