OLD | NEW |
| (Empty) |
1 <html xmlns="http://www.w3.org/1999/xhtml"> | |
2 <head> | |
3 <title>getElementsByName and foreign namespaces</title> | |
4 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/> | |
5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-gete
lementsbyname"/> | |
6 <link rel="stylesheet" href="../../../../../../../resources/testharness.css"/> | |
7 <script src="../../../../../../../resources/testharness.js"></script> | |
8 <script src="../../../../../../../resources/testharnessreport.js"></script> | |
9 </head> | |
10 <body> | |
11 <div id="log"></div> | |
12 <div id="test"> | |
13 <p name="math"><math name="math" xmlns="http://www.w3.org/1998/Math/MathML"> | |
14 <mi>a</mi> | |
15 <mo>+</mo> | |
16 <mi>b</mi> | |
17 </math></p> | |
18 <p name="svg"><svg width="300" height="100" name="svg" xmlns="http://www.w3.org/
2000/svg"> | |
19 <rect width="300" height="100" fill="rgb(0,0,255)"/> | |
20 </svg></p> | |
21 </div> | |
22 <script> | |
23 test(function() { | |
24 var ps = document.getElementById("test") | |
25 .getElementsByTagName("p"); | |
26 assert_equals(document.getElementsByName("math").length, 1); | |
27 assert_equals(document.getElementsByName("math")[0], ps[0]); | |
28 assert_equals(document.getElementsByName("svg").length, 1); | |
29 assert_equals(document.getElementsByName("svg")[0], ps[1]); | |
30 }); | |
31 </script> | |
32 </body> | |
33 </html> | |
OLD | NEW |