Bug 1501983 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

To add support for the webidl event handler, add onslotchange to https://searchfox.org/mozilla-central/source/dom/webidl/EventHandler.webidl 
(see https://html.spec.whatwg.org/#globaleventhandlers)

And for the DOM content attribute (https://html.spec.whatwg.org/#ix-event-handlers),
add new event message here https://searchfox.org/mozilla-central/source/widget/EventMessageList.h#458 and then 
map the event name to attribute like this
https://searchfox.org/mozilla-central/rev/12770bd668c0a6bdaa8eb96ad9507c6febe8d23d/dom/events/EventNameList.h#226
(or if the handler should be supported on svg elements too, use EventNameType_All, not EventNameType_HTMLXUL)

Once you've done that, run the relevant tests, since at least 
some of the subtests of https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/webappapis/scripting/events/event-handler-all-global-events.html should now pass, so you may need to remove
https://searchfox.org/mozilla-central/source/testing/web-platform/meta/html/webappapis/scripting/events/event-handler-all-global-events.html.ini#26-36
To add support for the webidl event handler, add onslotchange to https://searchfox.org/mozilla-central/source/dom/webidl/EventHandler.webidl 
(see https://html.spec.whatwg.org/#globaleventhandlers)

And for the DOM content attribute (https://html.spec.whatwg.org/#ix-event-handlers),
add new event message here https://searchfox.org/mozilla-central/source/widget/EventMessageList.h#458 and then 
map the event name to attribute like this
https://searchfox.org/mozilla-central/rev/12770bd668c0a6bdaa8eb96ad9507c6febe8d23d/dom/events/EventNameList.h#226
(or if the handler should be supported on svg elements too, use EventNameType_All, not EventNameType_HTMLXUL)
(please test other browsers whether they support onslotchange attribute on svg elements too)

Once you've done that, run the relevant tests, since at least 
some of the subtests of https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/webappapis/scripting/events/event-handler-all-global-events.html should now pass, so you may need to remove
https://searchfox.org/mozilla-central/source/testing/web-platform/meta/html/webappapis/scripting/events/event-handler-all-global-events.html.ini#26-36

Back to Bug 1501983 Comment 4