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

Re: [custom-elements]

From: Léonie Watson <tink@tink.uk>
Date: Thu, 14 Sep 2017 10:07:17 +0100
To: Jeff Robbins <jeffr@livedata.com>, public-webapps@w3.org
Message-ID: <d042646a-4420-7339-a338-df6c8af75b2a@tink.uk>
Jeff,

With apologies for not responding more quickly, can I suggest you ask 
your question as an issue on the Web Components Github repo?
https://github.com/w3c/webcomponents/issues

This is where discussion relating to Custom Elements etc. happens for th 
emost part.

Léonie


On 09/09/2017 03:01, Jeff Robbins wrote:
> I noticed in Custom Elements W3C Working Draft 13 October 2016, Section 
> 2.4 The CustomElementRegistry interface, paragraph #14 under Element 
> definition a detail that caught me by surprise:
> 
> Let upgrade candidates be all elements that are shadow-including 
> descendants 
> <https://dom.spec.whatwg.org/#concept-shadow-including-descendant> of 
> document, whose namespace is the HTML namespace 
> <https://html.spec.whatwg.org/multipage/infrastructure.html#html-namespace-2> and 
> whose local name is localName, in shadow-including tree order 
> <https://dom.spec.whatwg.org/#concept-shadow-including-tree-order>. 
> Additionally, if extends is non-null, only include elements whose 
> |is| value 
> <https://www.w3.org/TR/custom-elements/#concept-element-is-value> is 
> equal to name.
> 
> What surprised me is that I would have thought a custom element with 
> only "light DOM" children would also qualify as an "upgrade candidate".  
> Does this paragraph imply that the *only* custom elements that will be 
> upgraded are those that have a shadow root?   I'm thinking that is, 
> perhaps, overly specified?
> 
> (We need such custom elements here and now because polyfills and our 
> hospital customers running IE11.)
> 
> If it indeed expresses a hard requirement, then it would appear to 
> contradict section 2.2 Requirements for custom element constructors:
> 
> In general, the constructor should be used to set up initial state and 
> default values, and to set up event listeners and possibly a shadow root 
> <https://dom.spec.whatwg.org/#concept-shadow-root>.
> 
> If the constructor only "possibly" sets up a shadow root, then there's a 
> custom element lacking a shadow root, and thus isn't an upgrade candidate?!?
> 
> Any clarification would be much appreciated!  Thank you again for the 
> great work making the browser dev environment much better!
> 
> Best,
> Jeff Robbins
> jeffr@livedata.com <mailto:jeffr@livedata.com>
> www.livedata.com <http://www.livedata.com>
> 
> 

-- 
@LeonieWatson @tink@toot.cafe tink.uk carpe diem
Received on Thursday, 14 September 2017 09:07:46 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:43 UTC