Re: [WICG/webcomponents] Options for controlling specifics of "slotchange" events? (#933)

> > While I don't think an event-based approach to this problem will be entertained due to performance reasons, it doesn't seem difficult to polyfill this behavior.
> 
> I don't understand why we think performance is an issue with events. If there are events attached, DOM change events can be handled synchronously, and that machinery can be enabled _only if_ an event listener is added. Secondly deferring or batching event handling off of the synchronous events is literally no more difficult than using something like `MutationObserver`. `MutationObserver` has a worse developer experience than someone simply deferring their updates manually.

The biggest issue with sync DOM mutation events in the past has been security bugs. As a result, we're not willing to entertain the idea of adding a yet another sync DOM event like that. custom elements reaction callback is as synchronous as we'd ever tolerate for something like this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/933#issuecomment-914010039

Received on Tuesday, 7 September 2021 05:53:32 UTC