CSSStyleDeclaration

Overview

The CSSStyleDeclaration interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.

Location

Required Methods


getPropertyPriority

Returns the optional priority, "important".

 

method getPropertyPriority: String

 

String getPropertyPriority()

 

func getPropertyPriority() -> String

 

String getPropertyPriority()

 

Function getPropertyPriority() As String

getPropertyValue

Returns the property value given a property name.

 

method getPropertyValue: String

 

String getPropertyValue()

 

func getPropertyValue() -> String

 

String getPropertyValue()

 

Function getPropertyValue() As String

item

Returns a CSS property name by its index, or the empty string if the index is out-of-bounds.

 

method item: String

 

String item()

 

func item() -> String

 

String item()

 

Function item() As String

removeProperty

Removes a property from the CSS declaration block.

 

method removeProperty: String

 

String removeProperty()

 

func removeProperty() -> String

 

String removeProperty()

 

Function removeProperty() As String

setProperty

Modifies an existing CSS property or creates a new CSS property in the declaration block.

 

method setProperty

 

void setProperty()

 

func setProperty()

 

void setProperty()

 

Sub setProperty()