Help Center

Local Navigation

Object: CSSStyleDeclaration

Availability

BlackBerry® Device Software version 4.6 or later

The CSSStyleDeclaration object represents a CSS declaration block consisting of CSS properties and their values. This object enables you to determine the style properties currently set in a block or to set style properties explicitly within the block.

This object also provides access to the computed values of an element. It does not provide access to the specified or actual values of the CSS cascade.

CSSStyleDeclaration methods

Method name

Description

Support level

Availability

getPropertyCSSValue()

Returns the value of a CSS property as an object, if the property has been explicitly set.

DOM 2

4.6 or later

getPropertyPriority()

Returns the priority of a CSS property.

DOM 2

4.6 or later

getPropertyValue()

Returns the value of a CSS property as a string, if the property has been explicitly set.

DOM 2

4.6 or later

item()

Returns the name of the CSS property at the specified index in the collection.

DOM 2

4.6 or later

removeProperty()

Removes a CSS property from the style declaration block.

DOM 2

4.6 or later

setProperty()

Sets the value of a CSS property for the style declaration block.

DOM 2

4.6 or later

Previous topic: CSSRule properties

Was this information helpful? Send us your comments.