Visit Mozilla.org

DOM:cssRule.parentStyleSheet

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

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

[edit] Syntax

stylesheet = cssRule.parentStyleSheet 

[edit] Parameters

  • stylesheet is a stylesheet object.

[edit] Example

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

[edit] Notes

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

[edit] Specification

DOM Level 2 Style - cssRule