Re: Custom element design with ES6 classes and Element constructors

> 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