W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Removal of blocking script

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 10 Feb 2011 21:05:30 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1102102017340.28618@ps20323.dreamhostps.com>
On Thu, 10 Feb 2011, Juriy Zaytsev wrote:
> On Wed, Feb 9, 2011 at 7:49 PM, Ian Hickson <ian at hixie.ch> wrote:
> > On Mon, 15 Nov 2010, Juriy Zaytsev wrote:
> > >
> > > When removing [1] a long-loading script element from a document, 
> > > browsers seem to disagree on whether such removal should affect page 
> > > rendering. A simple test ? 
> > > http://kangax.github.com/jstests/blocking_script_removal_test/? 
> > > shows that Opera (9.x - 11) and IE (5.5 - 9) immediately continue 
> > > parsing the document upon element removal. However, in Firefox (3-4) 
> > > and Chrome (9) the document parsing is blocked until script is 
> > > loaded or times out (even when the actual element no longer exists 
> > > in the document, has its "src" reference an empty string, and there 
> > > exist no references to it).
> > >
> > > Does current draft explain what should happen in such case, and if 
> > > it does ? what is it (I can't seem to find it)? The existing 
> > > discrepancy suggests that it's something worth codifying.
> > >
> > > [1] Where "removing" is done through scripting (say, via Node's 
> > > `removeChild` or analogous method).
> >
> > The spec currently implies that the page should block for the full 
> > second,
> 
> Full second as in 1 second? Strange requirement.

I mean it should block for however long the script takes to be downloaded.


> Could you please point me to where exactly it's in the spec?

Look up "pending parsing-blocking script" and follow the references from 
there (click on the term in the single-page copy of the spec to get the 
various places it is referenced).

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 10 February 2011 13:05:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC