W3C home > Mailing lists > Public > public-html@w3.org > November 2010

Re: Executing script-inserted external scripts in insertion order

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 24 Nov 2010 01:49:03 -0800 (PST)
To: "Hallvord R. M. Steen" <hallvord@opera.com>
Cc: HTML WG <public-html@w3.org>
Message-ID: <1138260440.415228.1290592143384.JavaMail.root@cm-mail03.mozilla.org>
Hallvord R. M. Steen wrote:
> Hi Henri,
> can I ask you what a test like this one will output with your new
> algorithm?

Sure. (Though the code is in Firefox nightlies, so it's easy to try out.)

> http://testsuites.opera.com/script-execution/015.html
> 
> From the description, I'd expect the output to start with 'internal
> script
> #1, head script #1, head script #2, end script #1..' (ignore
> pass/fail, as
> we haven't had any proper spec here prior to HTML5 the pass/fail
> indication simply reflects whatever browser I thought made the most
> sense
> back when the tests were written).

[internal script #1, head script #1, head script #2, end script #1, inline script #2, external script #1, ]

> > While doing that, another undesirable characteristic of Gecko's old
> > behavior got fixed. Previously, script-inserted external scripts
> > would
> > block subsequent parser-inserted scripts
> 
> Does this make "external script #2" run before "external script #1" in
> this test:
> http://t/core/standards/scripts/scheduler/050.html ? (Pardon the
> complexity of the test, it does test a complex topic after all :-p)

Did you mean http://testsuites.opera.com/script-execution/050.html ?

It says:
[internal script #1, end script #1, external script #2, inline script #2, external script #1, include-5 before removing scripts, include-5 after removing scripts, ]

> What about this test:
> http://testsuites.opera.com/script-execution/081.html
> 
> Will both the parser-inserted external and the parser-inserted
> internal
> script run before the slow loading external script? (Test expects
> insertion order.. for now but probably not for much longer ;-))

[internal script #1, end script #1, external script #2, inline script #2, external script #1, ]

> (Variation: http://testsuites.opera.com/script-execution/082.html )

[internal script #1, end script #1, inline script #2, external script #1, load on include-1.js, external script #7, load on include-7.js, external script #2, load on include-2.js, ]

The results in Chrome 9 match the Firefox trunk results in the four tests mentioned above. Hooray for interop!

A bit alarmingly, IE9 PP7 doesn't run all the external scripts in the above-mentioned test cases (as reported by the test harness).

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 24 November 2010 09:49:40 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:27 UTC