TOC PREV NEXT INDEX

domref



ownerNode


ownerNode returns the node that associates this style sheet with the document.

Syntax

node = stylesheet.ownerNode
 

Parameters

node is an object reference to the element that brings in the stylesheet.

Example

<html>
 
<head>
 
  <link rel="StyleSheet" href="example.css" type="text/css" />
 
  <script>
 
     function stilo() {
 
       alert(document.styleSheets[0].ownerNode);
 
     }
 
  </script>
 
</head>
 

 
<body>
 
<div class="thunder">Thunder</div>
 
<button onclick="stilo()">ss</button>
 
</body>
 
</html>
 
// displays "object HTMLLinkElement"
 

Notes

For HTML, ownerNode may be the corresponding LINK or STYLE element. For XML, it may be the linking processing instruction. For style sheets that are included by other style sheets, the value of this attribute is null.

Specification

DOM Level 2 Styles - STYLESHEET


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX