Packagedom.style.stylesheets
Interfacepublic interface DocumentStyle
Implementors Document

Introduced in: DOM 2 Core 

The DocumentStyle interface provides a mechanism by which the style sheets embedded in a document can be retrieved. The expectation is that an instance of the DocumentStyle interface can be obtained by using binding-specific casting methods on an instance of the Document interface.

Note: CSSOM is in its very early stages. The intention is that this specification will in due course supersede DOM Level 2 Style.

See also

W3C - DOM Level 2 Style: DocumentStyle
W3C - CSSOM: DocumentStyle


Public Properties
 PropertyDefined By
  CSSOM lastStyleSheetSet : DOMString
[read-only] This attribute must initially have the value null.
DocumentStyle
  CSSOM preferredStyleSheetSet : DOMString
[read-only] This attribute must be the preferred style sheet set as set by the author.
DocumentStyle
  CSSOM selectedStyleSheetSet : DOMString
This attribute indicates which style sheet set is in use.
DocumentStyle
  DOM 2 Style styleSheets : StyleSheetList
[read-only] A list containing all the style sheets explicitly linked into or embedded in a document.
DocumentStyle
  CSSOM styleSheetSets : DOMStringList
[read-only] This must be a live list of the currently available style sheet sets.
DocumentStyle
Public Methods
 MethodDefined By
  
Invoking this method must change the disabled attribute on each StyleSheet object with a title in the styleSheets attribute, so that all those whose title matches the name argument are enabled, and all others are disabled.
DocumentStyle
Property Detail
CSSOM lastStyleSheetSetproperty
lastStyleSheetSet:DOMString  [read-only]

Introduced in: CSSOM 

This attribute must initially have the value null. Its value changes when the selectedStyleSheetSet attribute is set.


Implementation
    public function get lastStyleSheetSet():DOMString

See also

CSSOM preferredStyleSheetSetproperty 
preferredStyleSheetSet:DOMString  [read-only]

Introduced in: CSSOM 

This attribute must be the preferred style sheet set as set by the author. It is determined from the order of style sheet declarations and the Default-Style HTTP headers. If there is no preferred style sheet set, this attribute must be the empty string. The case of this attribute must exactly match the case given by the author where the preferred style sheet is specified or implied. This attribute must never be null.


Implementation
    public function get preferredStyleSheetSet():DOMString

See also

CSSOM selectedStyleSheetSetproperty 
selectedStyleSheetSet:DOMString

Introduced in: CSSOM 

This attribute indicates which style sheet set is in use. This attribute is live; changing the disabled attribute on style sheets directly will change the value of this attribute.

If all the sheets that are enabled and have a title have the same title (by case-sensitive comparisons) then the value of this attribute must be exactly equal to the title of the first enabled style sheet with a title in the styleSheets list. Otherwise, if style sheets from different sets are enabled, then the return value must be null (there is no way to determine what the currently selected style sheet set is in those conditions). Otherwise, either all style sheets that have a title are disabled, or there are no alternative style sheets, and selectedStyleSheetSet must return the empty string.


Implementation
    public function get selectedStyleSheetSet():DOMString
    public function set selectedStyleSheetSet(value:DOMString):void

See also

DOM 2 Style styleSheetsproperty 
styleSheets:StyleSheetList  [read-only]

Product Versions : Internet Explorer 5.5 Internet Explorer 6.0 Internet Explorer 7.0 Internet Explorer 8.0 as IE7 Internet Explorer 8.0 as IE8 Firefox 2.0 Firefox 3.0 Firefox 3.5 Safari 3.0 Safari 3.1 Safari 4.0 Chrome 1.0 Chrome 2.0 Opera 9.62 Opera 10.0a
Introduced in: DOM 2 Core 

A list containing all the style sheets explicitly linked into or embedded in a document. For HTML documents, this includes external style sheets, included via the HTML LINK element, and inline STYLE elements. In XML, this includes external style sheets, included via style sheet processing instructions.


Implementation
    public function get styleSheets():StyleSheetList

See also

CSSOM styleSheetSetsproperty 
styleSheetSets:DOMStringList  [read-only]

Introduced in: CSSOM 

This must be a live list of the currently available style sheet sets. This list is constructed by enumerating all the style sheets for this document available to the implementation, in the order they are listed in the styleSheets attribute, adding the title of each style sheet with a title to the list, avoiding duplicates by dropping titles that match (case-sensitively) titles that have already been added to the list.


Implementation
    public function get styleSheetSets():DOMStringList

See also

Method Detail
CSSOM enableStylesheetsForSet()method
public function enableStylesheetsForSet(name:DOMString):void

Introduced in: CSSOM 

Invoking this method must change the disabled attribute on each StyleSheet object with a title in the styleSheets attribute, so that all those whose title matches the name argument are enabled, and all others are disabled. Title matches must be case-sensitive.

Invoking this method with the empty string value must disable all alternative and preferred style sheets (but does not change the state of persistent style sheets).

Invoking this method with the null value must have no effect.

Style sheets that do not have a title are never affected by this method. This method does not change the values of the lastStyleSheetSet or preferredStyleSheetSet attributes.

Parameters

name:DOMString

See also