document.getElementsByName-interface.html (676B)
1 <!DOCTYPE html> 2 <title>Document.getElementsByName: interfaces</title> 3 <link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"> 4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-getelementsbyname"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <div id="log"></div> 8 <script> 9 test(function() { 10 var collection = document.getElementsByName("name"); 11 assert_class_string(collection, "NodeList"); 12 assert_true(collection instanceof NodeList, "Should be a NodeList"); 13 assert_false(collection instanceof HTMLCollection, 14 "Should not be a HTMLCollection"); 15 }); 16 </script>