1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00
serenity/Tests/LibWeb/Text/expected/DOM/Document-named-properties.txt
Andrew Kaster 94149db073 LibWeb: Implement Document named properties with light caching
We now cache potentially named elements on the Document when elements
are inserted and removed. This allows us to do lookup of what names are
supported much faster than if we had to iterate the tree every time.

This first cut doesn't implement the rules for 'exposed' object and
embed elements.
2024-02-16 16:18:31 -05:00

16 lines
426 B
Text

Submit <FORM >
document.bob === document.forms[0]: true
<BUTTON id="fred" >
img element with name 'foo' and id 'bar':
<IMG id="bar" >
img element with id 'baz', but no name:
baz === undefined: true
Multiple elements with name 'foo':
foos.length = 2
<IMG id="bar" >
<FORM >
obj element with name 'greg' and id 'banana':
<OBJECT id="banana" >
<OBJECT id="banana" >
goodbye greg/banana
no more greg or banana: true, true