ownerNode property (styleSheet)
Returns a reference to the element that contains the current styleSheet object.
Note: The ownerNode property is supported in Internet Explorer from version 9.
- If the current stylesheet belongs to a style element, then returns the style element.
- If the current stylesheet was imported by a link element, then returns the link element.
- If the current stylesheet was imported by an @import style rule, then returns null. In that case, use the ownerRule property to get the rule that imported the current stylesheet.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Returns a reference to the owner object or returns null.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the ownerNode property:
Did you find this example helpful?
User Contributed Comments