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

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

There is a newer version: 1.0.139
Show newest version
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 element) {
        return new DominoElement<>(element);
    }

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

    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 element() {
        return wrappedElement;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy