OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html><head> | 2 <html><head> |
3 <title>getElementsByClassName</title> | 3 <title>getElementsByClassName</title> |
4 <meta content="get class from children of element" name="description"> | 4 <meta content="get class from children of element" name="description"> |
5 <link href="https://dom.spec.whatwg.org/#dom-document-getelementsbyclassname
" rel="help"> | 5 <link href="https://dom.spec.whatwg.org/#dom-document-getelementsbyclassname
" rel="help"> |
6 <script src="../../../../resources/testharness.js"></script> | 6 <script src="../../../../resources/testharness.js"></script> |
7 <script src="../../../../resources/testharnessreport.js"></script> | 7 <script src="../../../../resources/testharnessreport.js"></script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <div id='log'></div> | 10 <div id='log'></div> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 <script type="text/javascript"> | 43 <script type="text/javascript"> |
44 test(function() | 44 test(function() |
45 { | 45 { |
46 var collection = document.getElementsByTagName("table")[0].getEl
ementsByClassName("te xt"); | 46 var collection = document.getElementsByTagName("table")[0].getEl
ementsByClassName("te xt"); |
47 assert_equals(collection.length, 1); | 47 assert_equals(collection.length, 1); |
48 assert_equals(collection[0].parentNode.nodeName, "TR"); | 48 assert_equals(collection[0].parentNode.nodeName, "TR"); |
49 }, "get class from children of element"); | 49 }, "get class from children of element"); |
50 </script> | 50 </script> |
51 </body></html> | 51 </body></html> |
OLD | NEW |