Re: [csswg-drafts] [cssom-1] Browsers do not really implement the "disallow modification" flag (#13650)

Decided to test this in Safari, it doesn't throw the error for any of these.
Although in Firefox (148.0.2), I am getting the correct error for all of them:
<img width="707" height="199" alt="Image" src="https://github.com/user-attachments/assets/944d98fb-891d-403d-9b52-e06bb4933d83" />

That was using this modified version of the test case: (since I don't have WPT infrastructure set up currently)
```html
<!doctype html>
<title>CSSStyleSheet.replace() disallow modification flag</title>
<script>
"use strict";
setTimeout(() => {
 const sheet = new CSSStyleSheet();
 sheet.replace("p { color: red; }");
 sheet.insertRule("p { color: blue; }");
 console.log("No insertRule error.");
}, 1000);

setTimeout(() => {
 const sheet = new CSSStyleSheet();
 sheet.replace("p { color: red; }");
 sheet.deleteRule(0);
 console.log("No deleteRule error.");
}, 2000);

setTimeout(() => {
 const sheet = new CSSStyleSheet();
 sheet.replace("p { color: red; }");
 sheet.replaceSync("p { color: blue; }");
 console.log("No replaceSync error.");
}, 3000);

setTimeout(async () => {
 const sheet = new CSSStyleSheet();
 sheet.replace("p { color: red; }");
 await sheet.replace("p { color: blue; }");
 console.log("No replace error.");
}, 4000);
</script>
```

-- 
GitHub Notification of comment by Psychpsyo
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13650#issuecomment-4062826557 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 15 March 2026 11:41:10 UTC