Internal utilities for working with the DOM.
Static Methods
-
DOMUtils.addStylesheet(path, id) common/util/dom_utils.js, line 75
-
Adds a link to a stylesheet into the head of a document.
Argument Type Attributes Description pathString Path to the stylesheet, relative to the Lens root.
idString <optional>
Optional id to apply to the link tag.
-
DOMUtils.buildEvent(name, bubble, props) common/util/dom_utils.js, line 33
-
Builds a custom event.
Argument Type Attributes Description nameString Name of the event.
bubbleBoolean Whether the event bubbles.
propsObject <optional>
Additional properties for the event.
-
DOMUtils.elementsAt() common/util/dom_utils.js, line 100
-
Returns the topmost element at (x, y) and all of its parents. The most specific element will be the first item in the array, and the document element will be the last item.
-
DOMUtils.fire(name, el, props) → {Boolean} common/util/dom_utils.js, line 20
-
Fires a custom event.
Returns:Argument Type Description nameString Name of the event.
elElement DOM element to fire the event on.
propsObject Additional properties for the event.
Returns false if stopPropagation was called on the event, true otherwise.
-
DOMUtils.fireBubbling(name, el, props) → {Boolean} common/util/dom_utils.js, line 61
-
Fires a custom event that bubbles up the DOM.
Returns:Argument Type Description nameString Name of the event.
elElement DOM element to fire the event on.
propsObject Additional properties for the event.
Returns false if preventDefault was called on the event, true otherwise.
-
DOMUtils.removeStylesheet(path) common/util/dom_utils.js, line 91
-
Unloads a stylesheet.
Argument Type Description pathString Path to the stylesheet, relative to the Lens root.