- From: Frederik Wessberg <notifications@github.com>
- Date: Tue, 13 Mar 2018 08:04:55 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 13 March 2018 08:06:20 UTC
As @OvermindDL1 touches on, the subclassing approach will not be functionally equivalent to the current approach with `is` because multiple built-in elements implement the same interface. This could be solved by introducing a one-to-one relationship between HTML interfaces and element selectors. Alternatively, the approach could work if allowing the selector for the customized built-in element to be referenced within an `is` attribute for all built-in elements that implements that interface. However, the subclassing approach would work great for new autonomous custom elements deriving from, say, `HTMLButtonElement`, working as in the current spec but allowing inheriting from other interfaces than `HTMLElement`, but I don’t see why customized built-in elements need to derive from HTMLElement or any of its descendents at all. Rather, they could be agnostic and receive a reference to the constructed element and otherwise support the regular custom element lifecycle hooks. So far, the proposal I’ve been most fond of has been Custom Attributes. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/509#issuecomment-372579282
Received on Tuesday, 13 March 2018 08:06:20 UTC