OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML> | |
2 <html> | |
3 <head> | |
4 <script src="../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <script> | |
8 description("This test ensures that tree mutation on the load doesn't break cons
istency."); | |
9 var invoked = false; | |
10 var spanElement = document.createElementNS("http://www.w3.org/1999/xhtml", "span
"); | |
11 var divElement = document.createElementNS("http://www.w3.org/1999/xhtml", "div")
; | |
12 var useElement = document.createElementNS("http://www.w3.org/2000/svg", "use"); | |
13 var emptyDocument = document.implementation.createDocument("", "", null); | |
14 | |
15 document.body.appendChild(spanElement); | |
16 divElement.appendChild(useElement); | |
17 useElement.addEventListener("load", function () { emptyDocument.adoptNode(useEle
ment); invoked = true; }, false); | |
18 spanElement.appendChild(divElement); | |
19 document.body.appendChild(useElement); | |
20 shouldBeFalse("invoked"); | |
21 | |
22 jsTestIsAsync = true; | |
23 setTimeout(function() { | |
24 shouldBeTrue("invoked"); | |
25 finishJSTest(); | |
26 }, 1); | |
27 | |
28 </script> | |
29 <body> | |
30 </html> | |
OLD | NEW |