CSSRule.parentStyleSheet
The parentStyleSheet
property of the
CSSRule
interface returns the StyleSheet
object in which
the current rule is defined.
Value
A StyleSheet
object.
Examples
let myRules = document.styleSheets[0].cssRules;
console.log(myRules.parentStyleSheet);
Specifications
Specification |
---|
CSS Object Model (CSSOM) # dom-cssrule-parentstylesheet |
Browser compatibility
BCD tables only load in the browser