ladybird/Tests/LibWeb/Text/input/wpt-import/css/cssom/delete-namespace-rule-when-child-rule-exists.html
2025-04-24 18:26:54 +02:00

16 lines
752 B
HTML

<!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>