7 var m = document.getElementById("m1");
9 m.removeChild(m.firstChild);
10 m.appendChild(document.createTextNode("Moved out of "
11 + event.target.getAttribute("id") + " to "
12 + event.relatedTarget.getAttribute("id") + "."));
17 var m = document.getElementById("m2");
19 m.removeChild(m.firstChild);
20 m.appendChild(document.createTextNode("Moved over "
21 + event.target.getAttribute("id") + " from "
22 + event.relatedTarget.getAttribute("id") + "."));
24 if (window.testRunner)
25 testRunner.notifyDone();
30 if (window.testRunner)
31 testRunner.dumpAsText();
33 if (window.eventSender) {
34 eventSender.mouseMoveTo(50, 50);
35 eventSender.mouseDown();
36 eventSender.mouseUp();
37 eventSender.mouseMoveTo(50, 150);
38 eventSender.mouseDown();
39 eventSender.mouseUp();
45 <body onload="test()">
47 <div id="A" style="background-color: red; width:100px; height:100px" onmouseout="out(event)"></div>
48 <div id="B" style="background-color: blue; width:100px; height:100px" onmouseover="over(event)"></div>
50 <p>This test checks that the relatedTarget property is set on mouse out and mouse over events.</p>
51 <p>To perform the test, move the mouse into the red box, and then drag it out of the red box into the blue box.</p>
52 <p>The text below should say "Moved out of A to B. Moved over B from A."</p>
53 <span id="m1"></span> <span id="m2"></span>