OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <iframe></iframe> | |
8 <div id="toBeMoved"></div> | |
9 <script> | |
10 description("ownerDocument of Attr should be set on setAttributeNode"); | |
11 elementToBeMoved = document.getElementById("toBeMoved"); | |
12 iframeElement = document.getElementsByTagName("iframe")[0]; | |
13 iframeDocument = iframeElement.contentWindow.document; | |
14 attr = iframeDocument.createAttribute("foo"); | |
15 shouldBe("attr.ownerDocument", "iframeDocument") | |
16 elementToBeMoved.setAttributeNode(attr); | |
17 shouldBe("attr.ownerDocument", "document") | |
18 iframeDocument.documentElement.appendChild(elementToBeMoved); | |
19 shouldBe("attr.ownerDocument", "iframeDocument") | |
20 </script> | |
21 </body> | |
22 </html> | |
OLD | NEW |