> On Jan 12, 2015, at 5:14 PM, Domenic Denicola <d...@domenic.me> wrote:
> 
> From: Ryosuke Niwa [mailto:rn...@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.

I mean that the parse would stop processing nodes at that point.  I expect that 
many people will be unhappy with this approach since it would have the same 
ramification as a "sync" script element (without "defer" or "async" attributes).

> 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?

The HTML parser would stop parsing until my-module.js is loaded.

- R. Niwa


Reply via email to