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:

NameType
selectorDOMElementRequest

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:

NameTypeDescription
selectorDOMElementQueryRequest | stringWhich 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:

NameTypeDescription
selectorDOMElementClassNameRequest | DOMElementTagNameRequestWhich elements should be returned?

Returns: any

A static NodeList.


numericFromPxString

â–¸ numericFromPxString(style: string): number

Parameters:

NameTypeDescription
stylestringThe style to parse, e.g. '18px'

Returns: number

Numeric value in CSS pixels.