Re: [WICG/webcomponents] HTML Modules: JavaScript Scoping of ShadowDom Children (Issue #959)

From @clshortfuse in #645:
> You can already create this monstrosity:
> 
> ```
> <template id="myCustomElementTemplate">
>     <button onclick="this.getRootNode().host.constructor.handleClick.call(this, event)">Click me!</button>
> </template>
> ```
> 
> And yes, it works and is cloneable. Though `on*` has the browser construct a new function and bind it with a EventListener that cannot be removed from JS. That doesn't scale well for very large DOMs (eg: table grid cells with `click`).

Quoting this in here for posterity's sake.

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

Message ID: <WICG/webcomponents/issues/959/1367004399@github.com>

Received on Thursday, 29 December 2022 00:51:43 UTC