mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-03 05:44:10 -08:00
Fix Client.java file in maven archetype
This commit is contained in:
parent
f3a4d3737b
commit
3f7b142d6e
|
@ -1,15 +1,11 @@
|
||||||
package ${package};
|
package ${package};
|
||||||
|
|
||||||
import org.teavm.dom.browser.Window;
|
import org.teavm.jso.dom.html.HTMLDocument;
|
||||||
import org.teavm.dom.html.HTMLDocument;
|
import org.teavm.jso.dom.html.HTMLElement;
|
||||||
import org.teavm.dom.html.HTMLElement;
|
|
||||||
import org.teavm.jso.JS;
|
|
||||||
|
|
||||||
public class Client {
|
public class Client {
|
||||||
private static Window window = (Window)JS.getGlobal();
|
|
||||||
private static HTMLDocument document = window.getDocument();
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
HTMLDocument document = HTMLDocument.current();
|
||||||
HTMLElement div = document.createElement("div");
|
HTMLElement div = document.createElement("div");
|
||||||
div.appendChild(document.createTextNode("TeaVM generated element"));
|
div.appendChild(document.createTextNode("TeaVM generated element"));
|
||||||
document.getBody().appendChild(div);
|
document.getBody().appendChild(div);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user