Shadow root in server-side Element

    A shadow root can be created simply with the command:

    A is not an actual element and only supports child element handling and getting the host element which contains the shadow root.

    Java

    1. @Tag("my-label")
    2. public class MyLabel extends Component {
    3. ShadowRoot shadowRoot = getElement().attachShadow();
    4. Label textLabel = new Label("In the shadow");
    5. }