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

Event::ComposedPath doesn't handle this.currentTarget == null #1343

Open
simonwuelker opened this issue Dec 20, 2024 · 4 comments
Open

Event::ComposedPath doesn't handle this.currentTarget == null #1343

simonwuelker opened this issue Dec 20, 2024 · 4 comments

Comments

@simonwuelker
Copy link

What is the issue with the DOM Standard?

Steps 4 and 5 of Event::composedPath say to

4. Let currentTarget be this’s currentTarget attribute value.
5. Append currentTarget to composedPath.

composedPath is a sequence<EventTarget>, but currentTarget is a EventTarget?, per the Event idl interface

It is unclear to me what should happen when currentTarget is null.

@annevk
Copy link
Member

annevk commented Jan 6, 2025

Is there a case where event's path is non-empty and currentTarget is null?

@simonwuelker
Copy link
Author

After reading the spec some more I don't think this can actually happen.

@annevk
Copy link
Member

annevk commented Feb 1, 2025

Would adding an assert help?

@annevk annevk reopened this Feb 1, 2025
@simonwuelker
Copy link
Author

Yeah, that seems reasonable.

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

No branches or pull requests

2 participants