Skip to content

api.CSSStyleSheet.replace - function does not work in Firefox 119 #21259

@SkepticaLee

Description

@SkepticaLee

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

replace () does not work in Firefox 119. Bug was reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1864815.

What browsers does this problem apply to, if applicable?

Firefox

What did you expect to see?

replace should overwrite existing rules before returning promise fulfillment, but neither overwrites the rules, nor adds any. It only works with a fresh new CSSStyleSheet ().

Did you test this? If so, how?

Comprehensive test of replace and replaceSync can be found at https://jsfiddle.net/skepticalee/bvwqk9a5/92/. The result list showing changes in the stylesheet rules is correct when viewed in Chrome and Edge, but not in Firefox.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/replace

MDN metadata

MDN page report details
  • Query: api.CSSStyleSheet.replace
  • Report started: 2023-11-16T18:41:27.923Z

Metadata

Metadata

Assignees

Labels

data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions