mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Update CSSRule
parent style sheet whenever parent rule changes
This commit is contained in:
parent
f336667771
commit
89a08cb7cf
Notes:
github-actions[bot]
2025-06-23 14:22:43 +00:00
Author: https://github.com/Calme1709
Commit: 89a08cb7cf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5176
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 27 additions and 1 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue