Skip to content

Make command events not composed #11255

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

josepharhar
Copy link
Contributor

@josepharhar josepharhar commented Apr 24, 2025

Based on feedback here, there may be a better alternative to making this event composed and we should remove composed now: #11148

(See WHATWG Working Mode: Changes for more details.)


/form-elements.html ( diff )

Based on feedback here, there may be a better alternative to making this
event composed: whatwg#11148
@jakearchibald
Copy link
Contributor

I assume tests will need to be updated too?

@keithamus
Copy link
Contributor

I assume tests will need to be updated too?

In particular https://github.com/web-platform-tests/wpt/blob/master/html/semantics/the-button-element/command-and-commandfor/button-event-dispatch.html will need to be refactored.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is editorially fine. OP needs to be completed and I recall @smaug---- raising concerns about this earlier. Is he okay with this now?

@smaug----
Copy link

If we are planning to change .source attribute handling to be similar to .relatedTarget, then this is fine (event would propagate if .target and .source are in different subtrees).

@jakearchibald
Copy link
Contributor

@alice has been exploring solutions for reference target #11148 (comment)

@alice
Copy link
Contributor

alice commented Apr 30, 2025

If we are planning to change .source attribute handling to be similar to .relatedTarget, then this is fine (event would propagate if .target and .source are in different subtrees).

Is this something relatedTarget does? I was trying to understand how related target affects event propagation, but I couldn't decipher it from the text.

@annevk
Copy link
Member

annevk commented Apr 30, 2025

If we want to make it work similar to relatedTarget that would be a bit more work. See https://dom.spec.whatwg.org/#concept-event-dispatch for how we deal with relatedTarget today.

@alice
Copy link
Contributor

alice commented Apr 30, 2025

@annevk Could you explain how relatedTarget affects dispatch in non-spec terms? I've read through the spec a bunch of times, but I'm sadly none the wiser.

@annevk
Copy link
Member

annevk commented Apr 30, 2025

At this point I would have to deduce it from first principles again as well I'm afraid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants