1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +00:00

LibWeb: Disallow inserting @import rules into a constructed stylesheet

This commit is contained in:
Tim Ledbetter 2024-02-24 07:46:59 +00:00 committed by Andreas Kling
parent b0f57a2785
commit 811033ec19
3 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
try {
const sheet = new CSSStyleSheet();
sheet.insertRule(`@import url("style-sheet-with-byte-order-mark.css")`);
println("FAIL");
} catch (e) {
println(`Inserting an @import rule into a constructed stylesheet throws: ${e.name}`);
}
});
</script>