4 <script src=
"../../resources/js-test.js"></script>
7 <div id=
"newParent"></div>
8 <a href=
"#" id=
"target"></a>
10 description("Test that adoptNode fails safely if prevented by a DOM mutation.");
13 newParent
= document
.getElementById("newParent");
14 target
= document
.getElementById("target");
15 target
.addEventListener("blur", function () { newParent
.appendChild(target
); }, false);
17 var anotherDocument
= document
.implementation
.createDocument("", "", null);
19 try { anotherDocument
.adoptNode(target
); } catch(e
) {}
20 shouldBe("target.ownerDocument.location", "document.location");
23 document
.addEventListener("DOMContentLoaded", run
, false);