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
|
@ -71,7 +71,7 @@ use crate::script_runtime::CanGc;
|
|||
/// <https://html.spec.whatwg.org/multipage/#event-handler-content-attributes>
|
||||
/// containing the values from
|
||||
/// <https://html.spec.whatwg.org/multipage/#globaleventhandlers>
|
||||
static CONTENT_EVENT_HANDLER_NAMES: [&str; 83] = [
|
||||
static CONTENT_EVENT_HANDLER_NAMES: [&str; 85] = [
|
||||
"onabort",
|
||||
"onauxclick",
|
||||
"onbeforeinput",
|
||||
|
@ -149,8 +149,10 @@ static CONTENT_EVENT_HANDLER_NAMES: [&str; 83] = [
|
|||
"onwebkittransitionend",
|
||||
"onwheel",
|
||||
// https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl
|
||||
"onanimationend",
|
||||
"onanimationstart",
|
||||
"onanimationiteration",
|
||||
"onanimationend",
|
||||
"onanimationcancel",
|
||||
// https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl
|
||||
"ontransitionrun",
|
||||
"ontransitionend",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue