html/browsers/the-window-object/named-access-on-the-window-object/
94 / 97 WPT subtests passing
- Failed
- 3
- Timed out
- 0
- Not run
- 0
- Test files
- 19
- Blocking files
- 0
Chrome 83 / 97 WPT subtests passing on the same files, 1 blocking
Tests
19 test files hereEach test file opens in place to its subtests, and each subtest that did not pass to its message.
Test fileSubtests passingChromeFailedStanding
basics.html 6 / 6 passingChrome 6 / 60 failedClean
6 passing subtests
- A named property must return an element as-is if its name attribute matches
- A named property must not be set if the element is not reachable from the Document
- A named property must not be enumerable
- A named property must return any element for which the id attribute matches
- A non element node in the document should not cause errors
- An element with identical name and id attributes should occur in the HTMLCollection once, not twice
changing.html 5 / 5 passingChrome 5 / 50 failedClean
5 passing subtests
- Changing an attribute must update the named properties (id)
- Changing an attribute must update the named properties (name)
- Changing an attribute must not remove the named properties if a different attribute still matches (id)
- Changing an attribute must not remove the named properties if a different attribute still matches (name)
- Changing an attribute that is not id or name must not cause errors
cross-global-npo.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Named access across globals
cross-origin-named-access.sub.html 0 / 3 passingChrome 1 / 33 failedExempt
Exempt from the 0.1 gate: Crane follows the browser majority
a cross-origin child is exposed by the name its container gives it, so all three subtests fail exactly as in Firefox; Chrome passes the changed-name case and Safari fails it at an earlier assertion
- Crane matches
- Firefox
- Chrome
- wpt.fyi run 4786307730243584: 1/3 (Chrome 157, 2358bd4835)
- Firefox
- wpt.fyi run 4877168468033536: 0/3 (Firefox 160, 2358bd4835)
- Safari
- wpt.fyi run 6479119966273536: 0/3 (Safari 27.2, 2358bd4835)
- Ruling
- the integrator's golden-rule-2 ruling (a), 2026-11-18, lane blk3 (merge a819ad6550d): cross-origin child navigables named by their container stay exposed by name, the Chrome and Firefox mechanism (HTML before the 2022 navigables rewrite; whatwg/html#12663 asks to restore it)
- Revisit
- when Chrome, Firefox or Safari changes its result on a newer aligned wpt.fyi run, or Crane's result moves
- ¶
FAILAccessing a cross-origin child global by name returns undefined
assert_equals: window.frame1 should be undefined for cross-origin iframes expected (undefined) undefined but got (object) [stringifying object threw SecurityError: Failed to read a named property from 'Window': Blocked a frame with origin "http://web-platform.test:8000" from accessing a cross-origin frame. with type object]
- ¶
FAILChild accessing its own global through a cross-origin parent's WindowProxy throws an exception
assert_equals: Accessing `window.parent.frame1` from the child throws a SecurityError expected "SecurityError" but got "No exception"
- ¶
FAILChild accessing its own global (through a changed name) on the cross-origin parent's WindowProxy throws an exception
assert_equals: Accessing window.parent.new_name should throw SecurityError expected "SecurityError" but got "No exception"
doc-no-window.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- A document without a Window must not cause errors
existing-prop.html 4 / 4 passingChrome 4 / 40 failedClean
4 passing subtests
- A named property must not be set if a property already exists
- A named property must not be set if a property already exists, even if undefined
- If a property is occupied by a named property but then the user sets it, the user's value shadows it
- A named property must not be set if the property already exists in the proxy
id-non-html-elements.html 30 / 30 passingChrome 30 / 300 failedClean
30 passing subtests
- Parsed svg and math elements with an id are exposed
- An element in the null namespace with an id is exposed
- An element in the SVG namespace with an id is exposed
- An element in the MathML namespace with an id is exposed
- An element in a namespace other than HTML, SVG, and MathML with an id is exposed
- An element in the SVG namespace whose local name is img is exposed by its id
- Non-HTML elements are included in the HTMLCollection returned for multiple matches
- Named access for a non-HTML element is updated as it is inserted, changed, and removed
- An element in the null namespace whose local name is embed is not exposed by its name attribute
- An element in the null namespace whose local name is form is not exposed by its name attribute
- An element in the null namespace whose local name is img is not exposed by its name attribute
- An element in the null namespace whose local name is object is not exposed by its name attribute
- An element in the SVG namespace whose local name is embed is not exposed by its name attribute
- An element in the SVG namespace whose local name is form is not exposed by its name attribute
- An element in the SVG namespace whose local name is img is not exposed by its name attribute
- An element in the SVG namespace whose local name is object is not exposed by its name attribute
- An element in the MathML namespace whose local name is embed is not exposed by its name attribute
- An element in the MathML namespace whose local name is form is not exposed by its name attribute
- An element in the MathML namespace whose local name is img is not exposed by its name attribute
- An element in the MathML namespace whose local name is object is not exposed by its name attribute
- An element in a namespace other than HTML, SVG, and MathML whose local name is embed is not exposed by its name attribute
- An element in a namespace other than HTML, SVG, and MathML whose local name is form is not exposed by its name attribute
- An element in a namespace other than HTML, SVG, and MathML whose local name is img is not exposed by its name attribute
- An element in a namespace other than HTML, SVG, and MathML whose local name is object is not exposed by its name attribute
- An element in the SVG namespace whose local name is img is not kept exposed by its name attribute
- An id attribute in a namespace other than null is not exposed
- A prefixed id attribute is not exposed
- An xml:id attribute is not exposed
- A name attribute in a namespace other than null on an img element is not exposed
- A prefixed name attribute on an img element is not exposed
live-collection.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- A retained named-access collection becomes empty when all matches are removed
- A retained named-access collection follows removal of the document element
multi-match.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- A named property must return a HTMLCollection if there are multiple matches
name-attribute-elements.html 3 / 3 passingChrome 3 / 30 failedClean
3 passing subtests
- Only elements with specific local names may be returned if their name attribute matches
- Only elements with specific local names may be returned if their name attribute matches (negative test)
- Removing an element for which the name attribute is not tracked, must not cause errors upon removing it
named-objects.html 6 / 6 passingChrome 6 / 60 failedClean
6 passing subtests
- Check if the first nested browsing context is returned by window['c']
- Check if window['a'] contains all embed, form, img, and object elements, and their order
- Check that window['fs'] does not return the frameset element with name='fs' (historical)
- Check if window['b'] returns the elements with the id='b'
- Check if window['d'] returns the element with id='d'
- Check widow[''] when there are some elements with empty id or name attribute
nested-context.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- A named property that matches any element that contains a nested browsing context, must return the WindowProxy of that context
- A named property that matches an element that contains a nested browsing context must return the element if using id
prototype.html 4 / 4 passingChrome 4 / 40 failedClean
4 passing subtests
- Property on window.
- Property on Window.prototype.
- Property on EventTarget.prototype.
- Property on Object.prototype.
removing.html 2 / 2 passingChrome 2 / 20 failedClean
2 passing subtests
- Removing an element must update the named properties
- Removing a non-element node must not cause errors
scoped-to-associated-document.html 6 / 6 passingChrome 6 / 60 failedClean
6 passing subtests
- Elements of the window's associated document are exposed
- Elements of a document created by createHTMLDocument() are not exposed
- Elements of a document created by DOMParser are not exposed
- Ids set after insertion into another document are not exposed
- Elements adopted into the associated document become exposed
- Elements adopted out of the associated document stop being exposed
strict-mode-redefine-readonly-property.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Adding/removing form with a name referring to a non-configurable property
window-named-properties.html 7 / 7 passingChrome 7 / 70 failedClean
7 passing subtests
- Static name
- Static id
- Static name on the prototype
- constructor
- duplicate property names
- Dynamic name
- Ghost name
window-null-names.html 1 / 1 passingChrome 1 / 10 failedClean
1 passing subtest
- Named access with null characters