1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <p id=
"result" xmlns:
a=
"urn:x-test:a"></p>
6 <script src=
"../../resources/testharness.js"></script>
7 <script src=
"../../resources/testharnessreport.js"></script>
8 <script type=
"text/javascript">//<![CDATA[
11 var result = document.getElementById(
"result");
12 result.innerHTML =
"<span a:test='some value via innerHTML'>Testing</span>";
13 var spanElement = result.firstChild;
14 assert_equals(spanElement.namespaceURI,
"http://www.w3.org/1999/xhtml",
"<span> in correct namespace");
15 assert_true(spanElement.hasAttributeNS(
"urn:x-test:a",
"test"),
"<span> has 'test' attribute in the 'urn:x-test:a' namespace");
16 assert_equals(spanElement.getAttributeNS(
"urn:x-test:a",
"test"),
"some value via innerHTML",
"'test' attribute in the 'urn:x-test:a' namespace has the correct value");
17 },
"set innerHTML to an XHTML fragment with in-scope namespace prefixes on attributes");