parentRule property (rule objects)
Note: The parentRule property is supported in Internet Explorer from version 9.This property can be used for rules in a @media at-rule. In that case, it retrieves a CSSRule object that represents the @media style rule. This property is rarely needed, because style rules are only accessible through their parent rules or style sheets.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Reference to the parent rule.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the parentRule property:
Did you find this example helpful?
User Contributed Comments