- From: James Graham <jgraham@opera.com>
- Date: Thu, 30 Aug 2012 16:57:53 +0200
- To: Jonas Sicking <jonas@sicking.cc>, whatwg@lists.whatwg.org
On 08/30/2012 04:45 PM, Jonas Sicking wrote: > On Thu, Aug 30, 2012 at 11:30 AM, Ian Hickson <ian@hixie.ch> wrote: >>> That's not what I'm suggesting. I'm suggesting that <script defer >>> src="..."> and <script defer> elements appearing in the markup and >>> parsed by the parser should always run before DOMContentLoaded firing. >>> This appears to be what Firefox does, and I would expect that the web >>> depends on this. For example I would expect defered to contain >>> document.write which should not blow away the current page. >> >> That's what the spec says, no? > > I thought so, but the comments in this thread made me think otherwise. > If that's the case then I'm happy. Unless I am horribly misreading the spec [1], <script defer src> will run before DOMContentLoaded, <script async src> and, depending on how it was created, <script src> may run after DOMContentLoaded and both <script defer> and <script async> are like plain <script> (i.e. these attributes apply only to external scripts). [1] http://www.whatwg.org/specs/web-apps/current-work/#the-end
Received on Thursday, 30 August 2012 14:58:34 UTC