LearnNewsExamplesServices
Frontmatter
id8286
titleEnhance DomAccess.getElement to support window and document targets
stateClosed
labels
enhancementaicore
assigneestobiu
createdAtJan 2, 2026, 11:50 AM
updatedAtJan 2, 2026, 12:05 PM
githubUrlhttps://github.com/neomjs/neo/issues/8286
authortobiu
commentsCount0
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 2, 2026, 12:04 PM

Enhance DomAccess.getElement to support window and document targets

Closed v11.18.0 enhancementaicore
tobiu
tobiu commented on Jan 2, 2026, 11:50 AM

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.

tobiu added the enhancement label on Jan 2, 2026, 11:50 AM
tobiu added the core label on Jan 2, 2026, 11:50 AM
tobiu added the ai label on Jan 2, 2026, 11:50 AM
tobiu added parent issue #8169 on Jan 2, 2026, 11:51 AM
tobiu closed this issue on Jan 2, 2026, 12:04 PM
tobiu assigned to @tobiu on Jan 2, 2026, 12:05 PM
jonnyamsp referenced in commit 48f9a47 - "enhancement(main): Enhance DomAccess.getElement to support window, document and body targets. Resolves #8286" on Jan 4, 2026, 4:10 AM