mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-15 23:52:57 +00:00
This readonly attribute returns the containing CSS rule, or null (in the case of element inline style).
15 lines
546 B
HTML
15 lines
546 B
HTML
<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>
|