Repository navigation
Support DOM event listeners and bubbling - #40
Merged
Merged
Conversation
commit: |
cowboyd
force-pushed
the
dom-mutation-and-events
branch
from
October 21, 2026 05:08
2cc8bab to
70ceefd
Compare
43081j
reviewed
Oct 21, 2026
43081j
reviewed
Oct 21, 2026
43081j
reviewed
Oct 21, 2026
cowboyd
force-pushed
the
dom-mutation-and-events
branch
6 times, most recently
from
November 2, 2026 16:45
c52ab19 to
4ce76a9
Compare
natemoo-re
approved these changes
Nov 3, 2026
43081j
reviewed
Nov 4, 2026
43081j
reviewed
Nov 4, 2026
43081j
reviewed
Nov 4, 2026
|
|
||
| // Node exposes these constants at runtime, but its type declarations omit them. | ||
| export const Event = globalThis.Event as typeof globalThis.Event & { | ||
| readonly NONE: 0; |
Contributor
There was a problem hiding this comment.
given its about as much code to re-declare these as it is to just have our own constants, what do you think about having our own constants?
i.e. const EVENT_NONE = 0 etc
otherwise i would try solve this through augmentation rather than casting. augment the global interface/class with the extra members etc
cowboyd
force-pushed
the
dom-mutation-and-events
branch
2 times, most recently
from
November 12, 2026 18:38
25c3313 to
2f7b33a
Compare
cowboyd
marked this pull request as draft
November 12, 2026 18:39
cowboyd
marked this pull request as ready for review
November 12, 2026 18:47
6 of 12 tasks
cowboyd
force-pushed
the
dom-mutation-and-events
branch
2 times, most recently
from
November 12, 2026 21:17
eeca628 to
485fda4
Compare
cowboyd
force-pushed
the
dom-mutation-and-events
branch
from
November 12, 2026 21:54
485fda4 to
61314e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Give DOM nodes native event listener registration/removal and dispatch events through their ancestor chain when
bubblesis true.This re-uses Node's native
EventTargetandEventclasses which do not support thecapturephaseType of change
Checklist
pnpm test)pnpm format)AI-generated code disclosure