On Sun, Aug 21, 2016 at 12:02 PM, Mark Giffin <m1...@earthlink.net> wrote:

> I have two questions I cannot seem to find the answer to in the Custom
> Elements spec,
> https://www.w3.org/TR/2016/WD-custom-elements-20160721/
> 1. Can I use the is= syntax for more than one customized built-in element,
> like <button is="big-button red-button">?


It's an interesting possibility, but there's a practical problem with it,
which is: What prototype does the button get? big-button's, or red-button's?

If you write that today, what happens is the whole value is treated as a
potential name. There are lots of ways to create elements, but take create
an element for a token
which is used by parsing, for example. Step 3 takes the value of the entire
attribute but since "big-button red-button" isn't a valid name (it contains
a space) step 4 will never find a matching definition.

2. Is the is= syntax for using a customized built-in element likely to be
> deprecated sometime soon? I have heard only rumors.

I work on Chrome. Here are our plans at the moment:

- We have implemented the "autonomous custom elements" parts of this spec
(that is the <custom-tags> part, not the is="..." part); you can try it
today by enabling Experimental Web Platform Features in chrome://flags in
Chrome 54 or later. Feedback <https://crbug.com/new> welcome.
- We are debating whether to ship this now; you can follow the process
<http://www.chromium.org/blink#TOC-Web-Platform-Changes:-Process> in this
- We implemented an earlier version of this spec, including "is". It uses
document.registerElement to define custom elements. We plan to remove this,
but we have a process for that too
<http://www.chromium.org/blink#TOC-Launch-Process:-Deprecation> and we
probably can't remove it this year.
- We are implementing the "new" is="..." stuff right now. You should be
able to play with it behind a flag in a couple of months.

> Thanks,
> Mark

Reply via email to