On Friday, August 27, 2021 at 8:37:49 PM UTC+2 ssi...@igalia.com wrote:

> Contact emails 
> ssin...@igalia.com, fw...@chromium.org 
>
> Explainer: 
> Currently, the way to listen an event is: 
> target.addEventListener("slotchange", listener); 
>
> After this addition an alternative attribute-based form will be 
> availlable for the developers 
> element 
> <target onslotchange="myListener()">


An actual explainer that outlines what the feature does, and its developer 
and user benefits would be helpful for reviewing this.
 

>
>
> Doc Link(s): 
> - https://html.spec.whatwg.org/#handler-onslotchange 
> - https://dom.spec.whatwg.org/#dom-shadowroot-onslotchange 
> - https://github.com/whatwg/dom/pull/785 
> - https://github.com/whatwg/html/pull/4129 
>
> Specification 
> https://html.spec.whatwg.org 
>
> Summary 
> The slotchange event is fired on a <slot> element when the node(s) it 
> contained change. One can listen to that event via the 
> EventTarget.addEventListener() API. The goal is now to expose the 
> onslotchange IDL attribute from the GlobalEventHandlers and ShadowRoot 
> interfaces, so that one can register a listener by attaching this 
> attribute to target elements. 
>
> Blink component 
> Blink>DOM 
>
> Motivation 
> The slotchange event is fired on a <slot> element when the node(s) it 
> contained change. One can naturally listen to that event via the 
> EventTarget.addEventListener() API. However, web developers are also 
> familiar with the alternative attribute-based form (e.g. 
> element.addEventListener("load", ...) Vs on <element onload="...">) 
> which is sometimes convenient for quick testing. For consistency with 
> other events, an attribute onslotchange is thus added. 
>
> Its important to have it on ShadowRoot too as <slot> is normally used 
> for web components, and there is a common use case to add a listener on 
> this ShadowRoot. 
>
> TAG review 
>
> TAG review status 
> Not applicable


Can you explain why is a TAG review not applicable?
 

>
>
> Risks 
>
> Interoperability and Compatibility 
>
> Gecko: 
> Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1501983) 
>
>
> WebKit: 
> Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=191310) 
>
>
> Web developers: 
> No signals


Could you gather signals? https://goo.gle/developer-signals
 

>
>
> Debuggability 
> No DevTools changes are required, treated like any other 
> event/attribute. 
>
> Is this feature fully tested by web-platform-tests? 
> Yes 
>
> Web Platform Tests: 
>
> dom/idlharness.window_exclude=Node 
> html/dom/idlharness.https_exclude=(Document_Window_HTML._) 
> html/dom/idlharness.https_include=(Document_Window) 
> html/dom/idlharness.https_include=HTML._ 
> html/webappapis/scripting/events/event-handler-all-global-events 
> html/webappapis/scripting/events/event-handler-attributes-body-window 
> html/webappapis/scripting/events/event-handler-attributes-frameset-window 
> html/webappapis/scripting/events/event-handler-attributes-windowless-body 
> mathml/relations/html5-tree/math-global-event-handlers.tentative 
>
>
> Requires code in //chrome? 
> False 
>
> Tracking bug 
> https://bugs.chromium.org/p/chromium/issues/detail?id=1006096 
>
> Patch: 
> https://chromium-review.googlesource.com/c/chromium/src/+/3096889 
>
> Estimated milestones 
> - 
>
> Link to entry on the Chrome Platform Status 
> https://chromestatus.com/feature/5739143222001664 
>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/452c11ef-8e06-4083-a946-ed163ba8a6bdn%40chromium.org.

Reply via email to