From 3f7b142d6e2eb69e40812b7d91b6d5cfd15ef543 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 21 Oct 2015 21:47:26 +0300 Subject: [PATCH] Fix Client.java file in maven archetype --- .../archetype-resources/src/main/java/Client.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/maven/webapp/src/main/resources/archetype-resources/src/main/java/Client.java b/tools/maven/webapp/src/main/resources/archetype-resources/src/main/java/Client.java index 15ca84491..3be6f6dfa 100644 --- a/tools/maven/webapp/src/main/resources/archetype-resources/src/main/java/Client.java +++ b/tools/maven/webapp/src/main/resources/archetype-resources/src/main/java/Client.java @@ -1,15 +1,11 @@ package ${package}; -import org.teavm.dom.browser.Window; -import org.teavm.dom.html.HTMLDocument; -import org.teavm.dom.html.HTMLElement; -import org.teavm.jso.JS; +import org.teavm.jso.dom.html.HTMLDocument; +import org.teavm.jso.dom.html.HTMLElement; public class Client { - private static Window window = (Window)JS.getGlobal(); - private static HTMLDocument document = window.getDocument(); - public static void main(String[] args) { + HTMLDocument document = HTMLDocument.current(); HTMLElement div = document.createElement("div"); div.appendChild(document.createTextNode("TeaVM generated element")); document.getBody().appendChild(div);