- From: poot <cvsmail@w3.org>
- Date: Fri, 23 Sep 2011 18:31:57 -0400
- To: public-html-diffs@w3.org
hixie: Explain why browsers shouldn't give up and should block scripts on style sheets even though they don't have to. (whatwg r6582) http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5275&r2=1.5276&f=h http://html5.org/tools/web-apps-tracker?from=6581&to=6582 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.5275 retrieving revision 1.5276 diff -u -d -r1.5275 -r1.5276 --- Overview.html 23 Sep 2011 22:22:57 -0000 1.5275 +++ Overview.html 23 Sep 2011 22:31:34 -0000 1.5276 @@ -12451,6 +12451,19 @@ and the user agent hasn't given up on that particular style sheet yet. A user agent may give up on a style sheet at any time.</p> + <p class="note">Giving up on a style sheet before the style sheet + loads, if the style sheet eventually does still load, means that the + script might end up operating with incorrect information. For + example, if a style sheet sets the color of an element to green, but + a script that inspects the resulting style is executed before the + sheet is loaded, the script will find that the element is black (or + whatever the default color is), and might thus make poor choices + (e.g. deciding to use black as the color elsewhere on the page, + instead of green). Implementors have to balance the likelihood of a + script using incorrect information with the performance impact of + doing nothing while waiting for a slow network request to + finish.</p> + <p>A <code><a href="#document">Document</a></code> <dfn id="has-a-style-sheet-that-is-blocking-scripts">has a style sheet that is blocking scripts</dfn> if there is either <a href="#a-style-sheet-that-is-blocking-scripts">a style sheet that is blocking scripts</a> in the context of that
Received on Friday, 23 September 2011 22:32:00 UTC