Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to event dispatching #403

Merged
merged 8 commits into from
Aug 9, 2024

Conversation

jakearchibald
Copy link
Contributor

No description provided.

@jakearchibald jakearchibald marked this pull request as draft August 6, 2024 14:45
- Respect stopPropagation throughout both capturing and bubbling
- Call listeners on the target element in both the capturing and bubbling phases
- Simplify returning defaultPrevented
@jakearchibald jakearchibald force-pushed the ja/polyfill-event-fixes branch from c75c75d to 36f8507 Compare August 6, 2024 14:49
@jakearchibald jakearchibald marked this pull request as ready for review August 6, 2024 14:49
@jakearchibald jakearchibald requested a review from lemonmade August 6, 2024 14:51
@lemonmade lemonmade merged commit 0ce1450 into add-listeners-and-attributes Aug 9, 2024
5 checks passed
@lemonmade lemonmade deleted the ja/polyfill-event-fixes branch August 9, 2024 18:29
@lemonmade
Copy link
Member

Thanks Jake!

lemonmade pushed a commit that referenced this pull request Aug 9, 2024
* Make immediatePropogationStopped private-ish

* Use workspace polyfill

* Stopping immediate propagation also stops regular propagation

* Assorted dispatching fixes

- Respect stopPropagation throughout both capturing and bubbling
- Call listeners on the target element in both the capturing and bubbling phases
- Simplify returning defaultPrevented

* Add changeset

* Better param name

* Fix lockfile

* Trying again…
lemonmade added a commit that referenced this pull request Aug 14, 2024
Add `getAttributeNames()` polyfill to support vitest assertions

Add event listener support

Add proper support for event listeners

Clean up some naming

Update READMEs

Fix Preact tests

More documentation

More documentation polish

Add missing generic argument

More docs polish

Fix `Event.bubbles` and `Event.composedPath()` implementations

Fix missing `connectedCallback()` and `disconnectedCallback)` calls

Added `bubbles` configuration option for `RemoteElement` events

Fixes to event dispatching (#403)

* Make immediatePropogationStopped private-ish

* Use workspace polyfill

* Stopping immediate propagation also stops regular propagation

* Assorted dispatching fixes

- Respect stopPropagation throughout both capturing and bubbling
- Call listeners on the target element in both the capturing and bubbling phases
- Simplify returning defaultPrevented

* Add changeset

* Better param name

* Fix lockfile

* Trying again…

Revert pnpm fixes

This reverts part of commit 0ce1450.

Minimal change to pnpm lockfile
lemonmade added a commit that referenced this pull request Aug 14, 2024
Add `getAttributeNames()` polyfill to support vitest assertions

Add event listener support

Add proper support for event listeners

Clean up some naming

Update READMEs

Fix Preact tests

More documentation

More documentation polish

Add missing generic argument

More docs polish

Fix `Event.bubbles` and `Event.composedPath()` implementations

Fix missing `connectedCallback()` and `disconnectedCallback)` calls

Added `bubbles` configuration option for `RemoteElement` events

Fixes to event dispatching (#403)

* Make immediatePropogationStopped private-ish

* Use workspace polyfill

* Stopping immediate propagation also stops regular propagation

* Assorted dispatching fixes

- Respect stopPropagation throughout both capturing and bubbling
- Call listeners on the target element in both the capturing and bubbling phases
- Simplify returning defaultPrevented

* Add changeset

* Better param name

* Fix lockfile

* Trying again…

Revert pnpm fixes

This reverts part of commit 0ce1450.

Minimal change to pnpm lockfile
lemonmade added a commit that referenced this pull request Aug 22, 2024
Add `getAttributeNames()` polyfill to support vitest assertions

Add event listener support

Add proper support for event listeners

Clean up some naming

Update READMEs

Fix Preact tests

More documentation

More documentation polish

Add missing generic argument

More docs polish

Fix `Event.bubbles` and `Event.composedPath()` implementations

Fix missing `connectedCallback()` and `disconnectedCallback)` calls

Added `bubbles` configuration option for `RemoteElement` events

Fixes to event dispatching (#403)

* Make immediatePropogationStopped private-ish

* Use workspace polyfill

* Stopping immediate propagation also stops regular propagation

* Assorted dispatching fixes

- Respect stopPropagation throughout both capturing and bubbling
- Call listeners on the target element in both the capturing and bubbling phases
- Simplify returning defaultPrevented

* Add changeset

* Better param name

* Fix lockfile

* Trying again…

Revert pnpm fixes

This reverts part of commit 0ce1450.

Minimal change to pnpm lockfile
lemonmade added a commit that referenced this pull request Aug 27, 2024
* Support for remote attributes and event listeners

Add `getAttributeNames()` polyfill to support vitest assertions

Add event listener support

Add proper support for event listeners

Clean up some naming

Update READMEs

Fix Preact tests

More documentation

More documentation polish

Add missing generic argument

More docs polish

Fix `Event.bubbles` and `Event.composedPath()` implementations

Fix missing `connectedCallback()` and `disconnectedCallback)` calls

Added `bubbles` configuration option for `RemoteElement` events

Fixes to event dispatching (#403)

* Make immediatePropogationStopped private-ish

* Use workspace polyfill

* Stopping immediate propagation also stops regular propagation

* Assorted dispatching fixes

- Respect stopPropagation throughout both capturing and bubbling
- Call listeners on the target element in both the capturing and bubbling phases
- Simplify returning defaultPrevented

* Add changeset

* Better param name

* Fix lockfile

* Trying again…

Revert pnpm fixes

This reverts part of commit 0ce1450.

Minimal change to pnpm lockfile

* Update .changeset/slimy-lizards-tickle.md

Co-authored-by: Jake Archibald <[email protected]>

* Only send AT_TARGET events to the remote environment

* Add more APIs for handling React/ Preact host handling of event listeners

* Add support for event properties

* Use weakmaps for storing private implementation details

* Export attribute and event listener updater

---------

Co-authored-by: Jake Archibald <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants