Re: HTML imports and rendering

On 6/24/13 2:31 AM, Hajime Morrita wrote:
> HTML Imports spec relies on the concept of "things that is blocking
> scripts".
> In HTML, <link>-ed styles are blocking scripts. So All styles that
> precede a <script> are loaded before the script execution.
> http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-link-element
>
> HTML Imports behaves in similar manner. The <link>s to HTML Import block
> following <script> execution.

So there are at least four possible things to block:

1)  Following script execution
2)  All following parsing
3)  Start of layout if the thing doing the blocking is inside <head>
     (modulo explicit layout flushes by the page)
4)  Start of painting

<script> does #2, which implies #1 and #3.

<link> does at least #1 per spec and also #3 in Gecko; I'm not sure 
whether the spec describes the interaction with #2.

I don't know whether any UAs have anything block #4.

Which of the above do we want imports to block?

-Boris

Received on Monday, 24 June 2013 13:37:51 UTC