ownerRule
Summary
Gets the CSS Rule that imported the style sheet, if any.
Property of css/cssom/styleSheetcss/cssom/styleSheet
Syntax
Note: This property is read-only.
var rule = stylesheet.ownerRule;
Return Value
Returns an object of type DOM NodeDOM Node
Of type CSSRule. Returns a CSSImportRule or null.
Notes
If the style sheet comes from an @import rule, the ownerRule property will contain a CSSImportRule object, and the ownerNode property will be null
. If the style sheet comes from a link, the ownerRule property will be null
, and the ownerNode will contain the node.
Related specifications
- DOM Level 2 Style
- Recommendation
See also
Related pages
- styleSheetstyleSheet
- cssRulescssRules
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]