import AbstractCSSStyleDeclaration from 'html-document/src/Abstract/AbstractCSSStyleDeclaration.js'
AbstractCSSStyleDeclaration
Direct Subclass:
CSSStyleDeclaration represents a collection of CSS property-value pairs. It is used in a few APIs
- HTMLElement.style - to manipulate the style of a single element (<elem style="...">);
- (TODO: reword) is an interface to the declaration block returned by the style property of a cssRule in a stylesheet, when the rule is a CSSStyleRule.
- CSSStyleDeclaration is also a read-only interface to the result of window.getComputedStyle().
Method Summary
Public Methods | ||
public |
getPropertyPriority(propertyName: string, important: String | undefined | false): * Returns the optional priority, "important". |
|
public |
getPropertyValue(propertyName: string): * Returns the optional priority, "important". |
|
public |
Returns a property name. |
|
public |
removeProperty(propertyName: string): * Returns the value deleted. |
|
public |
setProperty(propertyName: string, value: string, important: string) No return. |
Public Methods
public getPropertyPriority(propertyName: string, important: String | undefined | false): * source
Returns the optional priority, "important". Example: priString= styleObj.getPropertyPriority('color')
Return:
* |
public getPropertyValue(propertyName: string): * source
Returns the optional priority, "important". Example: priString= styleObj.getPropertyPriority('color')
Params:
Name | Type | Attribute | Description |
propertyName | string |
Return:
* | propertyValue |
public item(index: number): string source
Returns a property name. Example: nameString= styleObj.item(0) Alternative: nameString= styleObj[0]
Params:
Name | Type | Attribute | Description |
index | number |