Class ElementUtilsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getTextRecursively2()
      final String getTextRecursively()
      final Element getElement()
      final static Unit _fireDomEvent(Element $self, DomEvent event) Fires a DOM event on this element.
      final static Unit insertBefore(Element $self, Element newNode, Element existingNode) Inserts newNode as a child, right before an existingNode.
      final static Unit setOrRemoveAttribute(Element $self, String attribute, String value) Either calls Element.setAttribute (if the value is not null), or Element.removeAttribute (if the value is null).
      final static Unit toggle(ClassList $self, String className) Toggles className - removes it if it was there, or adds it if it wasn't there.
      final static List<Element> getVirtualChildren(Element $self) Returns all virtual child elements added via Element.appendVirtualChild.
      final static List<Element> getChildrenInSlot(Element $self, String slotName) Returns child elements with the slot attribute set to given slotName.
      final static Unit clearSlot(Element $self, String slotName) Removes all child elements from given slot, leaving it empty.
      final static List<Component> _findComponents(Element $self) Returns all components that are closest to this element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • _fireDomEvent

         final static Unit _fireDomEvent(Element $self, DomEvent event)

        Fires a DOM event on this element.

      • insertBefore

         final static Unit insertBefore(Element $self, Element newNode, Element existingNode)

        Inserts newNode as a child, right before an existingNode. A counterpart for JavaScript DOM Node.insertBefore().

      • setOrRemoveAttribute

         final static Unit setOrRemoveAttribute(Element $self, String attribute, String value)

        Either calls Element.setAttribute (if the value is not null), or Element.removeAttribute (if the value is null).

        Parameters:
        attribute - the name of the attribute.
      • toggle

         final static Unit toggle(ClassList $self, String className)

        Toggles className - removes it if it was there, or adds it if it wasn't there.

        Parameters:
        className - the class name to toggle, cannot contain spaces.
      • getVirtualChildren

         final static List<Element> getVirtualChildren(Element $self)

        Returns all virtual child elements added via Element.appendVirtualChild.

      • getChildrenInSlot

         final static List<Element> getChildrenInSlot(Element $self, String slotName)

        Returns child elements with the slot attribute set to given slotName.

      • clearSlot

         final static Unit clearSlot(Element $self, String slotName)

        Removes all child elements from given slot, leaving it empty.

      • _findComponents

         final static List<Component> _findComponents(Element $self)

        Returns all components that are closest to this element.