Interface: DOMUtils
A collection of utilities to manipulate the DOM.
Hierarchy
- DOMUtils
Methods
getDOMSelection
â–¸ getDOMSelection(selector
: DOMElementRequest): HTMLElement | null
Get one element in the DOM from a request. See DOMElementRequest.
Parameters:
Name | Type |
---|---|
selector | DOMElementRequest |
Returns: HTMLElement | null
An HTMLElement or null
.
getDOMSelectionAll
â–¸ getDOMSelectionAll(selector
: DOMElementQueryRequest | string): any
Get a collection of live elements in the DOM from a query request.
Parameters:
Name | Type | Description |
---|---|---|
selector | DOMElementQueryRequest | string | Which elements should be returned? |
Returns: any
A live HTMLCollection.
â–¸ getDOMSelectionAll(selector
: DOMElementClassNameRequest | DOMElementTagNameRequest): any
Get a collection of static elements in the DOM from a class or tag-name request.
Parameters:
Name | Type | Description |
---|---|---|
selector | DOMElementClassNameRequest | DOMElementTagNameRequest | Which elements should be returned? |
Returns: any
A static NodeList.
numericFromPxString
â–¸ numericFromPxString(style
: string): number
Parameters:
Name | Type | Description |
---|---|---|
style | string | The style to parse, e.g. '18px' |
Returns: number
Numeric value in CSS pixels.