Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/the-window-object/named-access-on-the-window-object/strict-mode-redefine-readonly-property.html - WPT Dashboard Interop Dashboard
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(() => {
"use strict";
const pathname = document.location.pathname;
const form = document.createElement('form');
form.name = 'location';
document.body.appendChild(form);
assert_equals(document.location?.pathname, pathname);
form.remove();
}, "Adding/removing form with a name referring to a non-configurable property");
</script>
</body>