1
0
Fork 0
firefox/testing/web-platform/tests/css/cssom/delete-namespace-rule-when-child-rule-exists.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
742 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>