Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/history/the-location-interface/location-tojson.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Location has no toJSON</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(() => {
assert_equals(location.toJSON, undefined)
assert_equals(Object.getOwnPropertyDescriptor(location, "toJSON"), undefined)
assert_false(location.hasOwnProperty("toJSON"))
})
</script>
<!-- See https://github.com/whatwg/html/pull/2294 for context. (And the HTML Standard of course.) -->