mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00

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.
16 lines
426 B
Text
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
|