All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dominokit.domino.ui.utils.DominoElement Maven / Gradle / Ivy

package org.dominokit.domino.ui.utils;

import elemental2.dom.DomGlobal;
import elemental2.dom.HTMLBodyElement;
import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import org.jboss.gwt.elemento.core.Elements;
import org.jboss.gwt.elemento.core.IsElement;

public class DominoElement extends BaseDominoElement> {

    private final E wrappedElement;

    public static  DominoElement of(E node) {
        return new DominoElement<>(node);
    }

    public static  DominoElement of(IsElement node) {
        return new DominoElement<>(node.asElement());
    }

    public static DominoElement body() {
        return new DominoElement<>(DomGlobal.document.body);
    }

    public static DominoElement div() {
        return DominoElement.of(Elements.div());
    }

    public DominoElement(E element) {
        this.wrappedElement = element;
        init(this);
    }

    @Override
    public E asElement() {
        return wrappedElement;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy