- From: Joseph Dalrymple <notifications@github.com>
- Date: Wed, 28 Dec 2022 16:51:30 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 29 December 2022 00:51:43 UTC
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