dom: Track "removed" event listener status (#36163)

The DOM event listener "removed" status should be supported to track
the following situations (with immediate effect of listener removal):
- Removing a later event listener while an earlier listener
  for the same event is running
- Nested usage (recursively dispatch another event) of "once" listeners
https://dom.spec.whatwg.org/#event-listener-removed

During event dispatching requires to clone event listeners list
on "invoke" step https://dom.spec.whatwg.org/#concept-event-listener-invoke
and the lowercase "event listener" concept in Servo is EventListenerEntry
https://dom.spec.whatwg.org/#concept-event-listener

Bug: #25479, #25090

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-03-29 02:34:04 +03:00 committed by GitHub
parent ed3dd8fbe0
commit 5f5bf87eee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 106 additions and 105 deletions

View file

@ -10,6 +10,3 @@
[Custom event listeners are to be removed from Window for an active but not fully active document]
expected: FAIL
[Event listeners are to be removed with immediate effect]
expected: FAIL