RESOLVED DUPLICATE of bug 118045 198536
cssText for content pseudo-elements are missing quotes and invalid
https://bugs.webkit.org/show_bug.cgi?id=198536
Summary cssText for content pseudo-elements are missing quotes and invalid
Clint Ayres
Reported 2019-06-04 10:22:27 PDT
Steps to reproduce: // Note, assumes a style tag exists const style = document.querySelector('style')[0]; style.sheet.insertRule('.test { content: "moo"; }'); // this is incorrect, missing quotes around _moo_ style.sheet.rules[0].cssText === ".test { content: moo; }"; style.sheet.insertRule(style.sheet.rules[0].cssText); // this is actually correct because the cssText string above is invalid style.sheet.rules[0].cssText === ".re-test { }";
Attachments
Clint Ayres
Comment 1 2019-06-04 10:24:16 PDT
^ last link in the reproduction was incorrect. should be as follows: // this is actually correct because the cssText string above is invalid style.sheet.rules[0].cssText === ".test { }";
Radar WebKit Bug Importer
Comment 2 2019-06-06 10:21:18 PDT
Karl Dubost
Comment 3 2022-09-26 20:05:23 PDT
*** This bug has been marked as a duplicate of bug 118045 ***
Note You need to log in before you can comment on or make changes to this bug.