DekGenius.com
Team LiB   Previous Section   Next Section
StyleSheet a style sheet of any type

Availability

DOM Level 2 StyleSheets

Subinterfaces

CSSStyleSheet

Properties

boolean disabled

If true, the style sheet is disabled and is not applied to the document. If false, the style sheet is enabled and is applied to the document (unless the media property specifies that the style sheet should not be applied to documents of this type).

readonly String href

The URL of a style sheet that is linked into the document, or null for inline style sheets.

readonly MediaList media

A list of media types for which this style sheet should be applied. If no media information is supplied for the style sheet, this property is a valid MediaList object that has a length of 0.

readonly Node ownerNode

The Document node that links the style sheet into the document, or the node that contains an inline style sheet. In HTML documents, this property refers to a <link> or <style> element. For style sheets that are included within other style sheets rather than directly in the document, this property is null.

readonly StyleSheet parentStyleSheet

The style sheet that included this one, or null if this style sheet was included directly in the document. See also "CSSStyleSheet.ownerRule."

readonly String title

The title of the style sheet, if one is specified. A title may be specified by the title attribute of a <style> or <link> tag that is the ownerNode of this style sheet.

readonly String type

The type of this style sheet, as a MIME type. CSS style sheets have a type of "text/css".

Description

This interface represents a style sheet that is associated with this document. If this is a CSS style sheet, the object that implements this StyleSheet interface also implements the CSSStyleSheet subinterface and defines properties and methods that allow you to examine and set the CSS rules that comprise the style sheet. See CSSStyleSheet for details.

If a DOM implementation supports style sheets, you can obtain a complete list of the style sheets associated with a document through the Document.styleSheets property. Furthermore, the HTML <style> and <link> elements and XML style-sheet ProcessingInstruction nodes implement the LinkStyle interface and provide a reference to the StyleSheet through a property named sheet.

See Also

CSSStyleSheet, Document.styleSheets, LinkStyle

Type of

LinkStyle.sheet, StyleSheet.parentStyleSheet

Returned by

StyleSheetList.item( )

    Team LiB   Previous Section   Next Section