mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Throw on deleting CSS @namespace rule in disallowed conditions
Fixes one(!) WPT test :^)
This commit is contained in:
committed by
Andreas Kling
parent
223c9c91e6
commit
2f76b24b89
Notes:
github-actions[bot]
2025-04-24 16:28:42 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/2f76b24b896 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4455 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Deleting a @namespace rule when list contains anything other than @import or @namespace rules should throw InvalidStateError.</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-1/#remove-a-css-rule">
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@namespace a url();
|
||||
</style>
|
||||
<script>
|
||||
test(function () {
|
||||
let styleSheet = document.styleSheets[0];
|
||||
styleSheet.cssRules[0];
|
||||
styleSheet.insertRule(`b {}`, 1);
|
||||
assert_throws_dom("InvalidStateError", () => styleSheet.deleteRule(0));
|
||||
}, "Deleting a @namespace rule when list contains anything other than @import or @namespace rules should throw InvalidStateError.");
|
||||
</script>
|
||||
Reference in New Issue
Block a user