mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 18:47:15 +02:00
LibWeb: Implement CSSStyleDeclaration.parentRule
This readonly attribute returns the containing CSS rule, or null (in the case of element inline style).
This commit is contained in:
committed by
Andreas Kling
parent
ec4d29849d
commit
a12d28fd30
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/a12d28fd30 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/168
@@ -0,0 +1,15 @@
|
||||
<style>
|
||||
span {
|
||||
color: purple;
|
||||
}
|
||||
</style>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const spanRule = document.styleSheets[0].cssRules[0];
|
||||
println("spanRule: " + spanRule + " ~ " + spanRule.cssText);
|
||||
println("spanRule.style: " + spanRule.style + " ~ " + spanRule.cssText);
|
||||
println("spanRule.style.parentRule: " + spanRule.style.parentRule + " ~ " + spanRule.cssText);
|
||||
println("spanRule.style.parentRule === spanRule: " + (spanRule.style.parentRule === spanRule));
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user