1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../../resources/js-test.js"></script>
8 <div id=
"toBeMoved"></div>
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")