1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=620295
6 <title>Test that the href property reflects xlink:
href=
"" on 'a' elements
</title>
7 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
11 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=620295">Mozilla Bug
620295</a>
14 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink">
15 <a id=
"a" xlink:
href=
"a"/>
21 var a
= document
.getElementById("a");
23 // Initial attribute value should be reflected in the href property
24 is(a
.href
.baseVal
, "a", "Initial property value");
26 // Updated attribute value should be reflected in the href property
27 a
.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "b");
28 is(a
.href
.baseVal
, "b", "Updated property value");
30 // Modifying the href property should cause the attribute to be updated
32 is(a
.getAttributeNS("http://www.w3.org/1999/xlink", "href"), "c", "Updated attribute value");