Search in sources :

Example 1 with Element

use of org.apache.tapestry5.dom.Element in project gwtproject by treblereel.

the class ScriptInjectorTest method cleanupWindow.

private void cleanupWindow(Window wnd, String property, JavaScriptObject scriptElement) {
    Js.asPropertyMap(wnd).delete(property);
    Element typedScriptElement = Js.cast(scriptElement);
    if (typedScriptElement != null) {
        typedScriptElement.parentNode.removeChild(typedScriptElement);
    }
}
Also used : Element(elemental2.dom.Element)

Example 2 with Element

use of org.apache.tapestry5.dom.Element in project elemental2 by google.

the class PromiseSample method installUi.

private static void installUi() {
    Element section = document.createElement("section");
    Element logs = document.createElement("div");
    logs.setAttribute("id", "logs");
    section.appendChild(logs);
    document.body.appendChild(section);
}
Also used : Element(elemental2.dom.Element)

Example 3 with Element

use of org.apache.tapestry5.dom.Element in project elemental2 by google.

the class PromiseSample method log.

private static void log(String msg) {
    Element div = document.createElement("div");
    div.textContent = msg;
    document.getElementById("logs").appendChild(div);
}
Also used : Element(elemental2.dom.Element)

Example 4 with Element

use of org.apache.tapestry5.dom.Element in project elemental2 by google.

the class RegExpSample method addResult.

private static void addResult(String label, Object value) {
    Element div = document.createElement("div");
    div.textContent = label + ": " + value;
    document.getElementById("results").appendChild(div);
}
Also used : Element(elemental2.dom.Element) HTMLInputElement(elemental2.dom.HTMLInputElement)

Example 5 with Element

use of org.apache.tapestry5.dom.Element in project nalu by NaluKit.

the class NaluPluginElemento method updateMetaPropertyContent.

@Override
public void updateMetaPropertyContent(String property, String content) {
    NodeList<Element> metaTagList = DomGlobal.document.getElementsByTagName("meta");
    for (int i = 0; i < metaTagList.length; i++) {
        if (metaTagList.item(i) instanceof HTMLMetaElement) {
            HTMLMetaElement nodeListElement = (HTMLMetaElement) metaTagList.item(i);
            if (!Objects.isNull(nodeListElement.getAttribute("property"))) {
                if (nodeListElement.getAttribute("property").equals(property)) {
                    nodeListElement.remove();
                    break;
                }
            }
        }
    }
    HTMLMetaElement metaElement = (HTMLMetaElement) DomGlobal.document.createElement("meta");
    metaElement.setAttribute("property", property);
    metaElement.content = content;
    DomGlobal.document.head.appendChild(metaElement);
}
Also used : Element(elemental2.dom.Element) HTMLMetaElement(elemental2.dom.HTMLMetaElement) IsElement(org.jboss.elemento.IsElement) HTMLElement(elemental2.dom.HTMLElement) HTMLMetaElement(elemental2.dom.HTMLMetaElement)

Aggregations

Element (elemental2.dom.Element)269 HTMLElement (elemental2.dom.HTMLElement)215 Test (org.junit.Test)175 HTMLDivElement (elemental2.dom.HTMLDivElement)129 HTMLButtonElement (elemental2.dom.HTMLButtonElement)63 HTMLInputElement (elemental2.dom.HTMLInputElement)60 Element (org.apache.tapestry5.dom.Element)39 DOMTokenList (elemental2.dom.DOMTokenList)38 Test (org.testng.annotations.Test)34 HTMLAnchorElement (elemental2.dom.HTMLAnchorElement)32 DataType (org.kie.workbench.common.dmn.client.editors.types.common.DataType)29 MarkupWriter (org.apache.tapestry5.MarkupWriter)16 ArrayList (java.util.ArrayList)14 IsElement (org.jboss.gwt.elemento.core.IsElement)14 List (java.util.List)13 Elements (org.jboss.gwt.elemento.core.Elements)13 HTMLSelectElement (elemental2.dom.HTMLSelectElement)12 EventType.click (org.jboss.gwt.elemento.core.EventType.click)12 ComponentModel (org.apache.tapestry5.model.ComponentModel)11 Ids (org.jboss.hal.resources.Ids)11