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