W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: Custom element design with ES6 classes and Element constructors

From: Ryosuke Niwa <rniwa@apple.com>
Date: Mon, 12 Jan 2015 15:54:39 -0800
Cc: Anne van Kesteren <annevk@annevk.nl>, WebApps WG <public-webapps@w3.org>
Message-id: <9EA2F16D-D452-492F-AA35-5BBBEAC9ED29@apple.com>
To: Domenic Denicola <d@domenic.me>

> On Jan 12, 2015, at 2:59 PM, Domenic Denicola <d@domenic.me> wrote:
> 
> From: Ryosuke Niwa [mailto:rniwa@apple.com] 
> 
>> As we have repeatedly stated elsewhere in the mailing list, we support option 1 since authors and frameworks can trivially implement 2 or choose to set "prototype" without us baking the feature into the platform.
> 
> At first I was sympathetic toward option 1, but then I realized that with ES6 modules all script loading becomes async, so it would be literally impossible to use custom elements in a .html file (unless your strategy was to wait for element registration, XHR the .html file into a string, then do `document.documentElement.innerHTML = theBigString`).
> 
> In other words, in an ES6 modules world, all custom elements are upgraded elements.


I see.  Thanks for that clarification.

In that case, we can either delay the instantiation of those unknown elements with "-" in their names until pending module loads are finished, or go with option 2.  We strongly prefer either one of those options over upgrading existing elements.

- R. Niwa
Received on Monday, 12 January 2015 23:55:11 UTC

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