Closed Bug 292083 Opened 19 years ago Closed 19 years ago

CSS stylesheet rules not accessible in DOM when called with @import

Categories

(Core :: DOM: CSS Object Model, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: knocte, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.6) Gecko/20050321 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.6) Gecko/20050321 Firefox/1.0.2

It seems that a stylesheet is not accessible through DOM when loaded via @import
rule. It is correctly loaded via style/link tags because I can access a class's
value. I will provide a testcase.

Reproducible: Always

Steps to Reproduce:
(Testcase attached)



I think this is an important feature related to W3C CSS/JS standards.
Attached file Primary testcase
Keywords: testcase
This bug is also present in Mozilla 1.8b (Gecko/20050217).
Tested on Linux: changing OS to ALL.

Changing component from DOM:Core to DOM:CSSOM. 
Component: DOM → DOM: CSSOM
OS: Windows XP → All
Summary: CSS stylesheet not accessible in DOM when called with @import → CSS stylesheet rules not accessible in DOM when called with @import
The behavior is correct.  The imported sheet is not in document.styleSheets,
since it's not directly linked to from the document.  It _is_, however,
accessible as document.styleSheets[0].cssRules[0].styleSheet (the .styleSheet
property of the DOMCSSImportRule object).

I suggest reading the W3C DOM CSS spec, which covers all this.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Thanks for reviewing. Sorry for submitting this invalid bug (I had doubts about
it, but didn't check on the spec).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: