Intent to Ship: Customized Built-in Elements

153 views
Skip to first unread message

TAMURA, Kent

unread,
Mar 11, 2018, 9:10:02 PM3/11/18
to blink-dev

Contact emails

tk...@chromium.org


Explainer

Section 4.13.1.2 'Creating a customized built-in element' in HTML specification.


Spec

4.13 Custom elements, and some other parts of HTML and DOM specifications.


Summary

Authors can create custom elements which reuse the element name and semantics of built-in elements by customElements.define() and 'is' attribute.

This feature supersedes "type extension" feature of Custom Elements V0.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/d/msg/blink-dev/j7Oo9JSPY8c/DMNbU2qdBgAJ


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

N/A


Risks

Interoperability and Compatibility

Interoperability risk is not low.

The situation won't be ideal because Apple is negative, however it will be better than the current situation. We shipped Custom Elements V0 with the "type extension" feature, which is equivalent to "customized built-in elements" in Custom Elements V1. Other browsers have never shipped Custom Elements V0. Firefox already implemented this feature in Nightly and Microsoft is positive. So sites using "type extension" will be able to run without a polyfill on multiple browsers if they switch to "customized built-in elements" from "type extension".


Edge: Public support; 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.)

Firefox: In development; Firefox Nightly 60 already supports this feature.

Safari: Negative signals; Apple has said they will NOT implement customized built-in elements (for example, here.)

Web developers: Positive; Multiple projects/companies asked us to ship this feature.


Ergonomics

N/A


Activation

Polymer team provides a polyfill for custom elements v1 without customized built-in elements. If it supports customized built-in elements, web authors can start using this feature.



Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

Yes, https://wpt.fyi/custom-elements

I think test coverage is good, and everything is testable with the current WPT infra.

Now wpt.fyi uses an older version of Google Chrome. Almost all tests pass with Google Chrome 67 canary.


Entry on the feature dashboard

https://www.chromestatus.com/feature/4670146924773376




--
TAMURA Kent
Software Engineer, Google


Rick Byers

unread,
Mar 15, 2018, 12:00:00 PM3/15/18
to TAMURA, Kent, blink-dev
LGTM1

I assume this is a required part of migrating people away from custom elements v0 and deprecating it in chromium.  Obviously the situation with Apple is worrysome, but if Microsoft and Mozilla are happy with this design then perhaps we can hope for eventual consensus as sites start to rely on it (and fall back to polyfills in Safari).

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGH7WqH-BG1M%2BBLm7TDkey%2BCzXNnGf0%3D16pFg%2BbbAJU8tGdJFA%40mail.gmail.com.

Yoav Weiss

unread,
Mar 15, 2018, 1:36:57 PM3/15/18
to Rick Byers, TAMURA, Kent, blink-dev
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY9zAgwTWyGXx6%3D5kxo-Tj9gPaQECqGTP_d4Wkr7DC1Pgw%40mail.gmail.com.

Chris Harrelson

unread,
Mar 15, 2018, 2:02:52 PM3/15/18
to Yoav Weiss, Rick Byers, TAMURA, Kent, blink-dev
Reply all
Reply to author
Forward
0 new messages