HTML

getElement(id, isParentopt) → (nullable) {HTMLElement|Window|Document}

Get an HTML element by the given id.
Parameters:
Name Type Attributes Default Description
id string | Array.<string> An HTML element id or an array in the format ["CONTAINER"] (app's container HTML element), or in the format ["WINDOW"] (page's window object), or in the format ["DOCUMENT"] (page's document object), or in the format ["BODY"] (document's body element) or in the format ["QUERYSELECTOR"] (CSS selector string).
isParent boolean <optional>
false Use the parent document/window to search for the element.
Returns:
An HTML element, window, document depending on the given "id" parameter or "null" if nothing was found.
Type
HTMLElement | Window | Document

getElements(ids, isParentopt) → (nullable) {Array.<?HTMLElement>|HTMLElement|Window|Document}

Get an array of HTML elements or a single HTML element by the given ids/id.
Parameters:
Name Type Attributes Default Description
ids Array.<string> An array of HTML element ids or an array with its first element being "CONTAINER" (app's container HTML element), "WINDOW" (page's window object), "DOCUMENT" (page's document object), "BODY" (document's body element) or "QUERYSELECTOR" (CSS selector string).
isParent boolean <optional>
false Use the parent document/window to search for elements.
Returns:
An array of HTML elements or a single HTML element, window, document depending on the given "ids" parameter or "null" if nothing was found.
Type
Array.<?HTMLElement> | HTMLElement | Window | Document