Bug 198536
| Summary: | cssText for content pseudo-elements are missing quotes and invalid | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Clint Ayres <clinton.ayres> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | karlcow, mihaip, mmaxfield, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 12 | ||
| Hardware: | All | ||
| OS: | All | ||
Clint Ayres
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Clint Ayres
^ 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
<rdar://problem/51488597>
Karl Dubost
*** This bug has been marked as a duplicate of bug 118045 ***