2 <p>Test of Range.createContextualFragment() with in-scope namespace prefixes on elements. If the test succeeds you will see the word
"PASS" below.
</p>
4 <script type=
"text/javascript">
5 function onIframeLoad() {
7 testRunner
.dumpAsText();
9 var result
= document
.getElementById("result");
10 result
.textContent
= "FAIL";
12 var iframe
= document
.getElementById("iframe"),
13 doc
= iframe
.contentDocument
,
14 range
= doc
.createRange(),
17 var defs
= doc
.getElementById("defs");
18 range
.setStart(defs
, 0);
19 docFragment
= range
.createContextualFragment("<\u0108:test id='test1'/><\u015D:test id='test2'/>");
20 defs
.appendChild(docFragment
);
22 var test1
= doc
.getElementById("test1");
23 if (test1
.namespaceURI
!= "urn:x-test:U+0108") {
24 result
.textContent
+= " - #test1 is in the wrong namespace";
27 var test2
= doc
.getElementById("test2");
28 if (test2
.namespaceURI
!= "urn:x-test:U+015D") {
29 result
.textContent
+= " - #test2 is in the wrong namespace";
33 result
.textContent
= "PASS";
36 <iframe id=
"iframe" src=
"resources/svg-document-ns2.svg" onload=
"onIframeLoad()"></iframe>