W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2016

Re: customized built-in element questions

From: Dominic Cooney <dominicc@google.com>
Date: Mon, 22 Aug 2016 20:53:16 +0900
Message-ID: <CAHnmYQ93ZmaqjRQkQ-g29h+mkq126+8L0Po1HvOpoZSO6o4NAg@mail.gmail.com>
To: Mark Giffin <m1879@earthlink.net>
Cc: WebApps WG <public-webapps@w3.org>
On Sun, Aug 21, 2016 at 12:02 PM, Mark Giffin <m1879@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
Received on Monday, 22 August 2016 11:53:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:15:03 UTC