StylePropertyMap

The StylePropertyMap interface of the CSS Typed Object Model API provides a representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.

MDN Reference

Properties

Link copied to clipboard
open external override val size: Int

The size read-only property of the StylePropertyMapReadOnly interface returns an unsigned long integer containing the size of the StylePropertyMapReadOnly object.

Functions

Link copied to clipboard
external fun append(property: String, vararg values: String)
external fun append(property: String, vararg values: CSSStyleValue)

The append() method of the StylePropertyMap interface adds the passed CSS value to the StylePropertyMap with the given property.

Link copied to clipboard
external fun clear()

The clear() method of the StylePropertyMap interface removes all declarations in the StylePropertyMap.

Link copied to clipboard
external fun delete(property: String)

The delete() method of the StylePropertyMap interface removes the CSS declaration with the given property.

Link copied to clipboard
open external override fun entries(): JsIterator<Tuple2<JsString, JsIterable<CSSStyleValue>>>
Link copied to clipboard
open external override fun forEach(action: (value: JsIterable<CSSStyleValue>, JsString) -> Unit)
Link copied to clipboard
external fun get(property: String): CSSStyleValue?

The get() method of the StylePropertyMapReadOnly interface returns a CSSStyleValue object for the first value of the specified property.

Link copied to clipboard
external fun getAll(property: String): ReadonlyArray<CSSStyleValue>

The getAll() method of the StylePropertyMapReadOnly interface returns an array of CSSStyleValue objects containing the values for the provided property.

Link copied to clipboard
open external override fun has(key: JsString): Boolean

open external override fun has(key: JsString): Boolean

The has() method of the StylePropertyMapReadOnly interface indicates whether the specified property is in the StylePropertyMapReadOnly object.

Link copied to clipboard
open external override fun keys(): JsIterator<JsString>
Link copied to clipboard
external fun set(property: String, vararg values: String)
external fun set(property: String, vararg values: CSSStyleValue)

The set() method of the StylePropertyMap interface changes the CSS declaration with the given property.

Link copied to clipboard
open external override fun values(): JsIterator<JsIterable<CSSStyleValue>>