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);
}
}
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);
}
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);
}
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);
}
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);
}
Aggregations