Re:Don't wait for "DOM ready" for your app to start
by untog on Friday June 08, 2012 @08:24PM
(#4086761)
That's what I thought. Which means the original post makes very little sense- if your <script> tags are just before </body> there's surely no real delay between that an using DOMContentLoaded?
[ Parent
| on HN ]
Re:Don't wait for "DOM ready" for your app to start
by cramforce on Friday June 08, 2012 @08:43PM
(#4086791)
The spec agrees with you, but even MDC does not:
https://developer.mozilla.org/en/DOM/DOM_event_reference/DOM...
DOMContentLoaded, in all important browsers, does block to wait for CSS. Manipulating the DOM before this event both increases the chance to make changes before first-paint (decreases "jigger" on page load) and gives you the chance to request more resources earlier.
Re:Don't wait for "DOM ready" for your app to start
by kevincennis on Friday June 08, 2012 @08:48PM
(#4086801)
Wow, that's a total surprise.
I guess I never really noticed this because my scripts are always included so much later in the document than my CSS.