LibWeb: Only put connected elements into document's by-name-or-id cache

This fixes an issue where disconnected elements were incorrectly
accessible as named properties on the document.
This commit is contained in:
Andreas Kling 2025-03-03 20:30:18 +01:00 committed by Andreas Kling
commit 12f5e9c5f8
Notes: github-actions[bot] 2025-03-03 23:52:46 +00:00
3 changed files with 95 additions and 12 deletions

View file

@ -0,0 +1,15 @@
Testing <div> element
,,,,,,,,,,,,,,,
Testing <form> element
,,,,,,[object HTMLFormElement],,[object HTMLFormElement],,,,,,,
Testing <img> element
,,,,,,[object HTMLImageElement],,[object HTMLImageElement],,,,,,,
Testing <embed> element
,,,,,,[object HTMLEmbedElement],,[object HTMLEmbedElement],,,,,,,
Testing <object> element
,,,,,,[object HTMLObjectElement],,[object HTMLObjectElement],,[object HTMLObjectElement],[object HTMLObjectElement],,[object HTMLObjectElement],,