Class LitUtils


  • public final class LitUtils
    extends Object
    Utils class, intended to ease working with LitElement related code on client side.
    Author:
    Vaadin Ltd
    • Method Detail

      • isLitElement

        public static boolean isLitElement​(elemental.dom.Node element)
        Checks if the given element is a LitElement.
        Parameters:
        element - the custom element
        Returns:
        true if the element is a Lit element, false otherwise
      • whenRendered

        public static void whenRendered​(elemental.dom.Element element,
                                        Runnable runnable)
        Invokes the runnable when the given Lit element has been rendered at least once.
        Parameters:
        element - the Lit element
        runnable - the command to run