Revision 205017 of CSSRule.parentStyleSheet

  • Revision slug: DOM/CSSRule/parentStyleSheet
  • Revision title: parentStyleSheet
  • Revision id: 205017
  • Created:
  • Creator: Dria
  • Is current revision? No
  • Comment

Revision Content

Summary

parentStyleSheet returns the stylesheet object in which the current rule is defined.

Syntax

stylesheet = cssRule.parentStyleSheet 

Parameters

  • stylesheet is a stylesheet object.

Example

if ( bgRule.parentStyleSheet != mySheet ) {
   // alien style rule!
}

Notes

See Gecko DOM Reference:event#DOM_styleSheet_Object for more information about the stylesheet object interface.

Specification

DOM Level 2 Style - cssRule

Revision Source

<p>
</p>
<h3 name="Summary">Summary</h3>
<p><b>parentStyleSheet</b> returns the stylesheet object in which the current rule is defined. 
</p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval"><i>stylesheet</i> = cssRule.parentStyleSheet 
</pre>
<h3 name="Parameters">Parameters </h3>
<ul><li><code>stylesheet</code> is a stylesheet object.
</li></ul>
<h3 name="Example">Example </h3>
<pre class="eval">if ( bgRule.parentStyleSheet != mySheet ) {
   // alien style rule!
}
</pre>
<h3 name="Notes">Notes </h3>
<p>See <a href="en/Gecko_DOM_Reference/event#DOM_styleSheet_Object">Gecko DOM Reference:event#DOM_styleSheet_Object</a> for more information about the stylesheet object interface. 
</p>
<h3 name="Specification">Specification </h3>
<p>DOM Level 2 Style - cssRule
</p>
Revert to this revision