Error thrown when an element is not in the DOM or invalid for the operation.
Options for creating an element using createElement.
Types of children that can be passed to createElement.
Element or EventTarget that can be passed into functions.
Object with a listener that is called when the corresponding event fires and the options that are passed into addEventListener.
Any event for an HTML or SVG element.
Event listener that is called with an event that corresponds to the name EN.
Event listener or descriptor used to add listeners to an element created
with the createElement function.
Object with a key of event name and value of an event listener or
EventDescriptorFor.
Name of the event handler.
Use to specify search criteria for finding element(s). You can find elements by selector, dataset entries, or attributes.
Additional options for setting focus to an element.
Namespace for the element.
Represents a type that can be either an Element, EventTarget, or a CSS selector.
Namespace for the element. This is only required for SVG elements.
Checks if the Element(s), EventTarget(s), or CSS selector(s) specified
as left and the Element, EventTarget, or CSS selector specified as
right do not match.
Returns true if the Element(s), EventTarget(s), or CSS selector(s) specified
as left and the Element, EventTarget, or CSS selector specified as
right do match.
Returns an element of type E for the specified target.
Creates an HTML element with the tag name TN and adds the properties/listeners
from the options object as well as the optional children.
Checks if the specified target exists in the DOM.
Query the DOM to find the elements matching the specified CSS selector in
the optionally specified parent.
Searches for all focusable elements in either the Document (if no parent
specified) or the specified parent.
Query the DOM for an element matching the specified CSS selector in the
optionally specified parent.
Sets focus to the specified target. Specify additional options to refine
the focus operation.
Returns the value of the specified target with the specified type. The
value is returned as a number if the valueAsNumber property
returns a valid number, a Date if the valueAsDate property
is a valid Date (not null),
a boolean if the input is a checkbox or radio type, otherwise is returned as a string.
Gets the ideal width of the input element (in pixels) that based on
its value or placeholder using the measureText
approach.
Checks if the specified child has the specified parent. If either element
doesn't exist in the DOM, it returns false.
Checks if the target has the ID property that matches id.
Determines if the child is a child of the parent in the DOM.
Checks if the target is visible in the browser viewport.
Checks if the target is the same or a child element of the parent.
Checks if the target is currently scrollable.
Checks if the target matches the specified tagName. If the target
doesn't exist or is invalid, it returns false.
Checks if the target is an input element of specified inputType. If
inputType is omitted, only checks if the target is an input element.
The inputType corresponds to the input element's type attribute.
Ensures the given target is within the visible scroll area of the specified
parent. If the target is not visible, scroll the parent.
Converts the items of a type NodeList
or HTMLCollection
to an array.
Returns an element of type E for the specified Element or EventTarget.
You can also pass in a CSS selector string, which will attempt to find the element
in the DOM.
This module provides functions for working with HTML and SVG elements.