Package com.vaadin.client
Class ElementUtil
- java.lang.Object
-
- com.vaadin.client.ElementUtil
-
public class ElementUtil extends Object
Utils class, intended to ease working with DOM elements on client side.- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 booleanhasTag(elemental.dom.Node node, String tag)Checks whether thenodehas requiredtag.
-
-
-
Method Detail
-
hasTag
public static boolean hasTag(elemental.dom.Node node, String tag)Checks whether thenodehas requiredtag.- Parameters:
node- the node to checktag- the required tag name- Returns:
trueif the node has required tag name
-
getElementById
public static elemental.dom.Element getElementById(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.- 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
-
-