Package com.vaadin.client
Class ElementUtil
java.lang.Object
com.vaadin.client.ElementUtil
Utils class, intended to ease working with DOM elements on client side.
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionstatic elemental.dom.ElementgetElementById(elemental.dom.Node context, String id) Searches the shadow root of the given context element for the given id or searches the light DOM if the element has no shadow root.static booleanChecks whether thenodehas requiredtag.
-
Method Details
-
hasTag
Checks whether thenodehas requiredtag.- Parameters:
node- the node to checktag- the required tag name- Returns:
trueif the node has required tag name
-
getElementById
Searches the shadow root of the given context element for the given id or searches the light DOM if the element has no shadow root.- Parameters:
context- the container element to search throughid- the identifier of the element to search for- Returns:
- the element with the given
idif found, otherwisenull
-