RE: Custom element design with ES6 classes and Element constructors

From: Ryosuke Niwa [mailto:rniwa@apple.com] 

> There's no brilliant solution here.  I'm suggesting to introduce something akin to sync script element.

> In this particular example, my-el will remain HTMLUnknownElement since it had already appeared when the script element to load the module is parsed.  A more interesting example would be the one where the script element to load my-module.js appears before my-el.  In that case, the instantiation of my-el is delayed until my-module.js is loaded.

I am still trying to tease out what "the instantiation of my-el is delayed" means. What would happen in my example where the my-module.js appears before my-el? I'm guessing from your response above, it would need to be <script type="sync-module" src="my-mobile.js"> to be any different, and just moving the <script type="module"> tag as-is would not change anything?

Received on Tuesday, 13 January 2015 01:14:51 UTC