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 471081 of StyleSheet

  • Revision slug: Web/API/StyleSheet
  • Revision title: StyleSheet
  • Revision id: 471081
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

{{CSSOMRef}}

An object implementing the StyleSheet interface represents a single style sheet. CSS style sheets will further implement the more specialized {{domxref("CSSStyleSheet")}} interface.

Properties

{{domxref("StyleSheet.disabled")}}
Is a {{domxref("Boolean")}} representing whether the current stylesheet has been applied or not.
{{domxref("StyleSheet.href")}} {{readonlyInline}}
Returns a {{domxref("DOMString")}} representing the location of the stylesheet.
{{domxref("StyleSheet.media")}} {{readonlyInline}}
Returns a {{domxref("MediaList")}} representing the intended destination medium for style information.
{{domxref("StyleSheet.ownerNode")}} {{readonlyInline}}
Returns a {{domxref("Node")}} associating this style sheet with the current document.
{{domxref("StyleSheet.parentStyleSheet")}} {{readonlyInline}}
Returns a {{domxref("StyleSheet")}} including this one, if any; returns null if there aren't any.
{{domxref("StyleSheet.title")}} {{readonlyInline}}
Returns a {{domxref("DOMString")}} representing the advisory title of the current style sheet.
{{domxref("StyleSheet.type")}}{{readonlyInline}}
Returns a {{domxref("DOMString")}} representing the style sheet language for this style sheet.

Specifications

Specification Status Comment
{{ SpecName('CSSOM', '#stylesheet', 'StyleSheet') }} {{ Spec2('CSSOM') }} No change from {{ SpecName('DOM2 Style') }}.
{{ SpecName('DOM2 Style', 'stylesheets.html#StyleSheets-StyleSheet', 'StyleSheet') }} {{ Spec2('DOM2 Style') }} Initial definition.

See also

  • {{domxref("CSSStyleSheet")}}

Revision Source

<div>
  {{CSSOMRef}}</div>
<p>An object implementing the <code>StyleSheet</code> interface represents a single style sheet. CSS style sheets will further implement the more specialized {{domxref("CSSStyleSheet")}} interface.</p>
<h2 id="Properties" name="Properties">Properties</h2>
<dl>
  <dt>
    {{domxref("StyleSheet.disabled")}}</dt>
  <dd>
    Is a {{domxref("Boolean")}} representing whether the current stylesheet has been applied or not.</dd>
  <dt>
    {{domxref("StyleSheet.href")}} {{readonlyInline}}</dt>
  <dd>
    Returns a {{domxref("DOMString")}} representing the location of the stylesheet.</dd>
  <dt>
    {{domxref("StyleSheet.media")}} {{readonlyInline}}</dt>
  <dd>
    Returns a {{domxref("MediaList")}} representing the intended destination medium for style information.</dd>
  <dt>
    {{domxref("StyleSheet.ownerNode")}} {{readonlyInline}}</dt>
  <dd>
    Returns a {{domxref("Node")}} associating this style sheet with the current document.</dd>
  <dt>
    {{domxref("StyleSheet.parentStyleSheet")}} {{readonlyInline}}</dt>
  <dd>
    Returns a {{domxref("StyleSheet")}} including this one, if any; returns <code>null</code> if there aren't any.</dd>
  <dt>
    {{domxref("StyleSheet.title")}} {{readonlyInline}}</dt>
  <dd>
    Returns a {{domxref("DOMString")}} representing the advisory title of the current style sheet.</dd>
  <dt>
    {{domxref("StyleSheet.type")}}{{readonlyInline}}</dt>
  <dd>
    Returns a {{domxref("DOMString")}} representing the style sheet language for this style sheet.</dd>
</dl>
<h2 id="Specification" name="Specification">Specifications</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{ SpecName('CSSOM', '#stylesheet', 'StyleSheet') }}</td>
      <td>{{ Spec2('CSSOM') }}</td>
      <td>No change from {{ SpecName('DOM2 Style') }}.</td>
    </tr>
    <tr>
      <td>{{ SpecName('DOM2 Style', 'stylesheets.html#StyleSheets-StyleSheet', 'StyleSheet') }}</td>
      <td>{{ Spec2('DOM2 Style') }}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{domxref("CSSStyleSheet")}}</li>
</ul>
Revert to this revision