Contact emails
Spec
HTML 4.13.1.2 Creating a customized built-in element. The normative requirements are in HTML and DOM for defining custom elements, parsing elements and creating elements.
There’s another kind of custom element, autonomous custom elements, which we shipped in Chrome 54. See the Intent to Ship for details.
Summary
Authors can create custom elements which reuse the element name and semantics of built-in elements.
Motivation
Built-in elements have useful semantics. For example, the video element can play video; the input element can participate in form submission; the template element can parse inert content in its parent’s context; and so on. Customized built-in elements enable authors to reuse these semantics and add their own additional methods and behavior.
Without customized built-in elements, authors have to compose built-in elements to use their semantics. The component has to keep track of the composition, reimplement the built-in element’s API to forward calls to it, and so on. This is really difficult to infeasible.
Web developers who have used it report that it is useful. For example, Polymer uses this feature from an old draft of the custom elements spec to implement a templating system by writing <template is=”dom-repeat”> for loops and <template is=”dom-if”> for conditionals.
Interoperability and Compatibility Risk
This is tricky and why we’re seeking feedback early:
- Mozilla is implementing custom elements (for example, see dom/base/CustomElementRegistry.*) including arguments which relate to customized built-in elements.
- Microsoft Platform Status has custom elements under consideration/roadmap priority medium. At TPAC 2016 they indicated they’re “generally okay with is= proposal [which I take to be shorthand for customized built-in elements].” (Meeting minutes.)
- Apple has said they will NOT implement customized built-in elements (for example, here.)
Ongoing technical constraints
Implementing this will make it easier to deprecate and remove the implementation of the old draft of custom elements because all of its use cases will have a path forward.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
OWP launch tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=652579
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4670146924773376
Requesting approval to ship?
No.
--
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+unsubscribe@chromium.org.