interface NodeCast {
    asElement(): null | glassEasel.Element;
    asGeneralComponent(): null | glassEasel.GeneralComponent;
    asInstanceOf<UData, UProperty, UMethod>(componentDefinition): null | ComponentInstance<UData, UProperty, UMethod, Empty>;
    asNativeNode(): null | NativeNode;
    asShadowRoot(): null | ShadowRoot;
    asTextNode(): null | TextNode;
    asVirtualNode(): null | VirtualNode;
}

Implemented by

Methods

  • Cast a node to an element (native node, virtual node, or component node)

    Returns null if the element is not a text node.

    Returns null | glassEasel.Element

  • Cast an element to a native node

    Returns null if the element is not a native node.

    Returns null | NativeNode

  • Cast an element to a shadow root

    Returns null if the element is not a shadow root.

    Returns null | ShadowRoot

  • Cast a node to a text node

    Returns null if the element is not a text node.

    Returns null | TextNode

  • Cast an element to a virtual node

    Returns null if the element is not a virtual node.

    Returns null | VirtualNode