mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Remove event handlers when attribute is removed (#38734)
We wouldn't handle the AttributeMutation::Removed for attribute event listeners and wouldn't remove the corresponding event listener. Added the necessary logic (using the newly EventTarget::is_content_event_handler to correctly only do this for known event handlers) and added links to the relevant parts of the spec. Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
1ad0ad6f25
commit
f334a56b07
7 changed files with 38 additions and 55 deletions
|
@ -524,8 +524,10 @@ macro_rules! global_event_handlers(
|
|||
(NoOnload) => (
|
||||
event_handler!(abort, GetOnabort, SetOnabort);
|
||||
event_handler!(auxclick, GetOnauxclick, SetOnauxclick);
|
||||
event_handler!(animationend, GetOnanimationend, SetOnanimationend);
|
||||
event_handler!(animationstart, GetOnanimationstart, SetOnanimationstart);
|
||||
event_handler!(animationiteration, GetOnanimationiteration, SetOnanimationiteration);
|
||||
event_handler!(animationend, GetOnanimationend, SetOnanimationend);
|
||||
event_handler!(animationcancel, GetOnanimationcancel, SetOnanimationcancel);
|
||||
event_handler!(beforeinput, GetOnbeforeinput, SetOnbeforeinput);
|
||||
event_handler!(beforematch, GetOnbeforematch, SetOnbeforematch);
|
||||
event_handler!(beforetoggle, GetOnbeforetoggle, SetOnbeforetoggle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue