W3C home > Mailing lists > Public > public-html-commits@w3.org > September 2011

html5/spec Overview.html,1.5275,1.5276

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 23 Sep 2011 22:31:39 +0000
To: public-html-commits@w3.org
Message-Id: <E1R7EHT-0001Oh-Iz@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv5351

Modified Files:
Log Message:
Explain why browsers shouldn't give up and should block scripts on style sheets even though they don't have to. (whatwg r6582)

Index: Overview.html
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:31:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:10:58 UTC