RESOLVED FIXED 10676
@charset rules not accessible via DOM
https://bugs.webkit.org/show_bug.cgi?id=10676
Summary @charset rules not accessible via DOM
Alexey Proskuryakov
Reported 2006-09-01 11:11:10 PDT
When a CSS file has a @charset declaration, it is not accessible via DOM (so, document.styleSheets[0].cssRules[0] is actually the second rule). A tricky part is that IE doesn't make it accessible either... but it uses a non-standard property, CSSStyleSheet.rules, so we can apparently work around this.
Attachments
proposed patch (16.24 KB, patch)
2006-09-01 11:28 PDT, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2006-09-01 11:28:13 PDT
Created attachment 10350 [details] proposed patch
Darin Adler
Comment 2 2006-09-03 12:13:22 PDT
Comment on attachment 10350 [details] proposed patch Do we really need those empty blocks in the yacc source? It looks cleaner to me with no block at all when there's no code. I'm really not a fan of boolean parameters like omitCharsetRules, but I don't have anything better to suggest. It should be omitCharsetRules with an "s" by the way. r=me
Alexey Proskuryakov
Comment 3 2006-09-03 12:30:12 PDT
(In reply to comment #2) > Do we really need those empty blocks in the yacc source? It looks cleaner to me > with no block at all when there's no code. I was getting type mismatch errors before I added empty blocks. Perhaps I'm just missing a better way to avoid them?
Alexey Proskuryakov
Comment 4 2006-09-04 11:27:36 PDT
Committed revision 16217.
Note You need to log in before you can comment on or make changes to this bug.