Context:
The DomAccess.getElement() method currently supports retrieving elements by ID or data attribute.
For advanced event simulation (Neural Link), we need to dispatch events to window and document as well.
Proposed Change:
Enhance src/main/DomAccess.mjs getElement(id) to support reserved keywords:
'window' -> returns globalThis (window)
'document' -> returns document
'document.body' -> returns document.body
Benefit:
Provides a single source of truth for DOM node resolution across the framework, avoiding duplicate logic in addons.
Context: The
DomAccess.getElement()method currently supports retrieving elements by ID or data attribute. For advanced event simulation (Neural Link), we need to dispatch events towindowanddocumentas well.Proposed Change: Enhance
src/main/DomAccess.mjsgetElement(id)to support reserved keywords:'window'-> returnsglobalThis(window)'document'-> returnsdocument'document.body'-> returnsdocument.bodyBenefit: Provides a single source of truth for DOM node resolution across the framework, avoiding duplicate logic in addons.