diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs index f0c0b7d5fee..a8c157d6c8b 100644 --- a/components/script/dom/eventtarget.rs +++ b/components/script/dom/eventtarget.rs @@ -70,8 +70,10 @@ use crate::script_runtime::CanGc; /// /// containing the values from -/// -static CONTENT_EVENT_HANDLER_NAMES: [&str; 85] = [ +/// and +/// as well as +/// specific attributes for elements +static CONTENT_EVENT_HANDLER_NAMES: [&str; 108] = [ "onabort", "onauxclick", "onbeforeinput", @@ -160,6 +162,32 @@ static CONTENT_EVENT_HANDLER_NAMES: [&str; 85] = [ // https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers-interface "onselectstart", "onselectionchange", + // https://html.spec.whatwg.org/multipage/#windoweventhandlers + "onafterprint", + "onbeforeprint", + "onbeforeunload", + "onhashchange", + "onlanguagechange", + "onmessage", + "onmessageerror", + "onoffline", + "ononline", + "onpagehide", + "onpagereveal", + "onpageshow", + "onpageswap", + "onpopstate", + "onrejectionhandled", + "onstorage", + "onunhandledrejection", + "onunload", + // https://w3c.github.io/encrypted-media/#attributes-3 + "onencrypted", + "onwaitingforkey", + // https://svgwg.org/svg2-draft/interact.html#AnimationEvents + "onbegin", + "onend", + "onrepeat", ]; #[derive(Clone, JSTraceable, MallocSizeOf, PartialEq)] diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 0343219909b..94665de8238 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -524326,7 +524326,7 @@ [] ], "event-handler-attributes.mjs": [ - "8d54524950b9c09d8e4dccbb369968262c3098fd", + "3ac700d3dbf73d85c95109e6662baf4db43835f4", [] ], "frame-without-trusted-types.html": [ diff --git a/tests/wpt/meta/trusted-types/TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative.html.ini b/tests/wpt/meta/trusted-types/TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative.html.ini deleted file mode 100644 index 9f3536bd6ab..00000000000 --- a/tests/wpt/meta/trusted-types/TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative.html] - expected: ERROR diff --git a/tests/wpt/meta/trusted-types/set-event-handlers-content-attributes.tentative.html.ini b/tests/wpt/meta/trusted-types/set-event-handlers-content-attributes.tentative.html.ini deleted file mode 100644 index 190d602c91a..00000000000 --- a/tests/wpt/meta/trusted-types/set-event-handlers-content-attributes.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[set-event-handlers-content-attributes.tentative.html] - expected: ERROR diff --git a/tests/wpt/tests/trusted-types/support/event-handler-attributes.mjs b/tests/wpt/tests/trusted-types/support/event-handler-attributes.mjs index 8d54524950b..3ac700d3dbf 100644 --- a/tests/wpt/tests/trusted-types/support/event-handler-attributes.mjs +++ b/tests/wpt/tests/trusted-types/support/event-handler-attributes.mjs @@ -35,13 +35,17 @@ export async function getEventHandlerAttributeWithInterfaceNames() { addOnAttributes(htmlIDL, interfaceName); }); - const encryptedMediaIDL = await (await fetch("/interfaces/encrypted-media.idl")).text(); - // HTMLMediaElement (the parent for