Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1065816 of StyleSheet.disabled

  • Revision slug: Web/API/StyleSheet/disabled
  • Revision title: StyleSheet.disabled
  • Revision id: 1065816
  • Created:
  • Creator: Nickolay
  • Is current revision? Yes
  • Comment note that disabled=false doesn't imply the stylesheet is active - https://drafts.csswg.org/cssom/#concept-css-style-sheet-disabled-flag

Revision Content

{{APIRef("CSSOM")}}

The StyleSheet.disabled property indicates whether the style sheet is prevented from applying to the document. A style sheet may be disabled by manually setting this property to true or if it's an inactive alternative style sheet. Note that disabled == false does not guarantee the style sheet is applied (it could be removed from the document, for instance).

Syntax

bool = stylesheet.disabled 

Example

// if the stylesheet is disabled... 
if (stylesheet.disabled) {
   // apply style in-line 
}

Specification

disabled

Revision Source

<div>{{APIRef("CSSOM")}}</div>

<p>The <code><strong>StyleSheet.disabled</strong></code> property indicates whether the style sheet is prevented from applying to the document. A style sheet may be disabled by manually setting this property to <code>true</code> or if it's an inactive <a href="/en-US/docs/Web/CSS/Alternative_style_sheets">alternative style sheet</a>. Note that <code>disabled == false</code> does not guarantee the style sheet is applied (it could be removed from the document, for instance).</p>

<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="eval">
<em>bool</em> = stylesheet.disabled 
</pre>

<h2 id="Example" name="Example">Example</h2>

<pre>
// if the stylesheet is disabled... 
if (stylesheet.disabled) {
   // apply style in-line 
}
</pre>

<h2 id="Specification" name="Specification">Specification</h2>

<p><a class="external" href="https://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html#StyleSheets-StyleSheet-disabled">disabled </a></p>
Revert to this revision