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::dispatch uses possibly uninitialized clearTargets #1344

Open
simonwuelker opened this issue Dec 21, 2024 · 0 comments
Open

Event::dispatch uses possibly uninitialized clearTargets #1344

simonwuelker opened this issue Dec 21, 2024 · 0 comments

Comments

@simonwuelker
Copy link

What is the issue with the DOM Standard?

Step 10. of Event::dispatch (If clearTargets is true: ) uses a variable clearTargets that is defined in Step 5.11 (Let clearTargets be true if [...]), but if the if-condition in Step 5. (If target is not relatedTarget or target is event’s relatedTarget:) is false then 5.11 is never executed and clearTargets is uninitialized.

It is unusual for spec-pseudocode to use a variable outside of its declared scope anyways, so i think this is an accident.

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

No branches or pull requests

1 participant