[whatwg/dom] Event::dispatch uses possibly uninitialized `clearTargets` (Issue #1344)

### What is the issue with the DOM Standard?

Step 10. of [Event::dispatch](https://dom.spec.whatwg.org/#concept-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.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1344
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1344@github.com>

Received on Saturday, 21 December 2024 02:04:02 UTC