location-stringifier.html (800B)
1 <!DOCTYPE html> 2 <title>Location stringifier</title> 3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> 4 <link rel="help" href="https://webidl.spec.whatwg.org/#es-stringifier"> 5 <script src=/resources/testharness.js></script> 6 <script src=/resources/testharnessreport.js></script> 7 <script src=/common/stringifiers.js></script> 8 <div id=log></div> 9 <script> 10 test_stringifier_attribute(location, "href", true); 11 12 test(function() { 13 const prop1 = Object.getOwnPropertyDescriptor(location, "toString"), 14 prop2 = Object.getOwnPropertyDescriptor(location, "href") 15 16 assert_true(prop1.enumerable) 17 assert_false(prop1.writable) 18 assert_false(prop1.configurable) 19 20 assert_true(prop2.enumerable) 21 assert_false(prop2.configurable) 22 assert_equals(typeof prop2.get, "function") 23 }) 24 </script>