Help Center

Local Navigation

Object: StyleSheet

Availability

BlackBerry® Device Software version 4.6 or later

The StyleSheet object represents a single style sheet associated with a document. A StyleSheet object can represent either an external style sheet, or an inline style element.

StyleSheet properties

Property name

Type

Description

Status

Support level

Availability

disabled

boolean

When true, indicates that the style sheet is not applied.

Note that if the media specified in the MediaList object returned by StyleSheet.media is not supported by the BlackBerry® Browser, then this property is ignored.

writable

DOM 2 Style

4.6 or later

href

DOMString

Returns the URI of an external style sheet.

read only

DOM 2 Style

4.6 or later

media

MediaList

Returns the destination media for the style information. If no media has been specified, this property returns the empty MediaList object.

The media is often specified in StyleSheet.ownerNode.

read only

DOM 2 Style

4.6 or later

ownerNode

Node

Returns the Node that associates this style sheet with the document. For HTML documents, this is typically the corresponding <link> or <style> element.

If the style sheet is the child of another style sheet, this property returns null.

read only

DOM 2 Style

4.6 or later

parentStyleSheet

StyleSheet

Returns the StyleSheet object that contains the style sheet, if one exists.

If the style sheet is not the child of another style sheet, this property returns null.

read only

DOM 2 Style

4.6 or later

title

DOMString

Returns the title of the style sheet.

The title is often specified in StyleSheet.ownerNode.

read only

DOM 2 Style

4.6 or later

type

DOMString

Returns the style sheet language used by the style sheet, specified as a content type, such as “text/css”.

The content type is often specified in StyleSheet.ownerNode.

read only

DOM 2 Style

4.6 or later

Previous topic: RGBColor properties

Was this information helpful? Send us your comments.