mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb: Update CSSRule parent style sheet whenever parent rule changes
This commit is contained in:
Notes:
github-actions[bot]
2025-06-23 14:22:43 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/89a08cb7cf7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5176 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style id="style">
|
||||
@media all {
|
||||
}
|
||||
</style>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const mediaRule = document.styleSheets[0].cssRules[0];
|
||||
mediaRule.insertRule("foobar {}", 0);
|
||||
|
||||
if (mediaRule.cssRules[0].parentStyleSheet === document.styleSheets[0]) {
|
||||
println("Pass!");
|
||||
} else {
|
||||
println("Fail!");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user