com.vaadin.flow.dom.
Class ShadowRoot
All Implemented Interfaces:
Represents a shadow dom root of an element.
The root can be created by Element.attachShadow()
.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShadowRoot
Gets the shadow root instance mapped to the given state node.
getHost()
Node<?>
Gets the parent node.
protected ShadowRoot
getSelf()
Gets the narrow typed reference to this object.
Gets the state provider for this element.
static boolean
isShadowRoot
(StateNode node) Checks whether the given
node
is a shadow root node.Methods inherited from class com.vaadin.flow.dom.Node
accept, appendChild, appendChild, appendVirtualChild, appendVirtualChild, ensureChildHasParent, equals, getChild, getChildCount, getChildren, getNode, hashCode, indexOfChild, insertChild, insertChild, isVirtualChild, removeAllChildren, removeChild, removeChild, removeChild, removeVirtualChild, removeVirtualChild, setChild
-
Method Details
-
get
Gets the shadow root instance mapped to the given state node.
Parameters:
node
- the state node, notnull
Returns:
the shadow root for the node, not
null
-
isShadowRoot
Checks whether the given
node
is a shadow root node.Parameters:
node
- the state node, notnull
Returns:
true
if it's a shadow root, notnull
-
getParentNode
Description copied from class:
Node
Gets the parent node.
Overrides:
getParentNode
in classNode<ShadowRoot>
Returns:
the parent node or null if this element does not have a parent
-
getHost
-
getSelf
Description copied from class:
Node
Gets the narrow typed reference to this object.
Specified by:
getSelf
in classNode<ShadowRoot>
Returns:
this object casted to its type
-
getStateProvider
Description copied from class:
Node
Gets the state provider for this element.
This method is meant for internal use only.
Overrides:
getStateProvider
in classNode<ShadowRoot>
Returns:
the state provider for this element
-