--- title: cssRule.parentStyleSheet slug: Web/API/CSSRule/parentStyleSheet translation_of: Web/API/CSSRule/parentStyleSheet ---
Summary
parentStyleSheet returns the object type of style sheet, in which the rule is defined.
stylesheet = cssRule.parentStyleSheet
stylesheet
stylesheet is an object type.if (bgRule.parentStyleSheet! = MySheet) { // Style alien rule! }
See Gecko DOM Reference: event # DOM_styleSheet_Object for more information about the interface type objects stylesheet.
DOM Level 2 Style - cssRule