Constructor
# new CustomProperty(name, value, contextopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string
|
The CSS property name | ||
value |
string
|
number
|
The CSS property value | ||
context |
HTMLElement
|
<optional> |
document.documentElement | The DOM Element style with apply to |
Example
const property = new CustomProperty('name', 10);
Members
any
# static value
The property value
Example
const property = new CustomProperty('name', 10);
// Also updates the DOM style
property.value = 100;
Methods
# toString() → {string}
Transforms this to string
The string representation of this.
string
Example
const property = new CustomProperty('name', 10);
console.log(`${property}`);