new CSSStyleSheet causes a TypeError: Illegal constructor
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
People
(Reporter: jaysmith024, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox for Android
Steps to reproduce:
Using FF Dev Edition: 71.0b4
In console, try:
var s = new CSSStyleSheet();
causes an exception:
"TypeError: Illegal constructor."
Why is that?
Actual results:
"TypeError: Illegal constructor."
Expected results:
new instance of CSSStyleSheet object created so that i can replaceSync() on it and insert it into my shadow dom via adoptedStyleSheets.
Comment 1•5 years ago
|
||
Why is that?
Because constructable stylesheets are only implemented in chrome at the moment. They're on the roadmap.
Comment 2•5 years ago
|
||
Hi :) is there any ETA? Thanks!
Comment 3•5 years ago
|
||
(In reply to elefanteblanco5 from comment #2)
Hi :) is there any ETA? Thanks!
We haven't yet started to work on this feature, so no ETA yet.
But as I said in bug 1520690 I'm happy to mentor people to prototype this if there's somebody interested.
Comment 4•5 years ago
|
||
Thanks so much Emilio.
Description
•