W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2009

styleSheets array - link vs @import

From: David Perrell <davidp@hpaa.com>
Date: Thu, 25 Jun 2009 15:33:14 -0700
To: <www-dom@w3.org>

With this markup:

  <link href="/css/mystyle.css" rel="stylesheet" type="text/css">
  <style type="text/css">
    [some style rules]

followed by this script:

  <script type="text/javascript">

the alert gives length==2 in MSIE, Firefox and Opera, while in Google Chrome
it gives length==1;

Change the linked stylesheet to imported stylesheet, e.g.:

  <style type="text/css">
    @import url(/css/mystyle.css);
  <style type="text/css">
    [some style rules]

and Google Chrome gives length==2;

Clearly, Google Chrome is not creating an index in the styleSheets array for
a stylesheet loaded via a LINK until that stylesheet is completely loaded.

Is *correct* behavior specified anywhere?

David P
Received on Thursday, 25 June 2009 22:34:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:55 UTC