document.getElementsByName-same.html (697B)
1 <!DOCTYPE html> 2 <title>Calling getElementsByName with the same argument</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 <div id="test"> 9 <div name="abcd"></div> 10 </div> 11 <script> 12 test(function() { 13 var list1 = document.getElementsByName("abcd"); 14 var list2 = document.getElementsByName("abcd"); 15 assert_true(list1 === list2 || list1 !== list2); 16 }, "The user agent may return the same object as the object returned by the earlier call."); 17 </script>