The context element
The element to check
true
if the given element is contained, false
otherwise
Checks if the current environment is in the browser and can access and modify the DOM.
Adds specific class to a given element
The element to add class to
The class to be added
The target element
Apply a single CSS style rule to a given element
The element to add styles to
The style property to be added
The style value to be added
Apply multiple CSS style rules to a given element
The element to add styles to
The key-value object of style properties to be added
Get a DOM container
Get the height of a DOM element
The DOM element
Whether to get the client height
The height of the DOM element
Get the offset of a DOM element
The DOM element
The offset of the DOM element
Get the offset parent of a DOM element
The DOM element
The offset parent of the DOM element
Get the position of a DOM element
The DOM element
The offset parent of the DOM element
Whether to calculate the margin
The position of the DOM element
Returns the size of the scrollbar.
Force recalculation.
The size of the scrollbar.
Gets the value for a style property
The DOM element
The style property
The value of the style property
Get the width of a DOM element
The DOM element
Whether to get the client width
The width of the DOM element
Get the Window object of browser
The DOM element
The Window object of browser
Check whether an element has a specific class
The element to be checked
The class to be checked
true
if the element has the class, false
otherwise
Checks whether element
is focusable or not.
isFocusable(document.querySelector("input")); // true
isFocusable(document.querySelector("input[tabindex='-1']")); // true
isFocusable(document.querySelector("input[hidden]")); // false
isFocusable(document.querySelector("input:disabled")); // false
Check if the document is overflowing and account for the scrollbar width
The container to check
The document is overflowing
Get the name of the DOM element
The DOM element
The name of the DOM element
Unbind target
event eventName
's callback listener
.
The DOM element
The event name
The event listener
The event options
Bind target
event eventName
's callback listener
.
The DOM element
The event name
The event listener
The event options
The event listener
Returns the top-level document object of the node.
The DOM element
The top-level document object of the node
Returns the top-level window object of the node.
The DOM element
The top-level window object of the node
Remove a class from a given element
The element to remove the class from
The class to be removed
The target element
Remove a style property from a DOM element
The DOM element
key(s) typeof [string , array]
Gets the number of pixels to scroll the element's content from the left edge.
The DOM element
Sets the number of pixels to scroll the element's content from its left edge.
The DOM element
The number of pixels to scroll the element's content from its left edge
Gets the number of pixels that an element's content is scrolled vertically.
The DOM element
Sets the number of pixels that an element's content is scrolled vertically.
The DOM element
The number of pixels that an element's content is scrolled vertically
Toggle a class on an element
The DOM element
The class name
The DOM element
Generated using TypeDoc
Checks if an element contains another given element.