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

org.dominokit.domino.ui.utils.TextNode 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.Text;

import static java.util.Objects.isNull;

public class TextNode {

    public static Text empty() {
        return DomGlobal.document.createTextNode("");
    }

    public static Text of(String content) {
        if (isNull(content) || content.isEmpty()) {
            return empty();
        }
        return DomGlobal.document.createTextNode(content);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy