From 8788830f6eca5220e4c5f797cdc9b7cb501b2f09 Mon Sep 17 00:00:00 2001 From: jfwittmann Date: Wed, 21 Oct 2015 14:45:10 +0200 Subject: [PATCH 1/2] Fix bug in Window. Add return statement to JSBody script for prompt(message,defaultValue) --- jso/apis/src/main/java/org/teavm/jso/browser/Window.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jso/apis/src/main/java/org/teavm/jso/browser/Window.java b/jso/apis/src/main/java/org/teavm/jso/browser/Window.java index bbd12ceff..8c1f4b872 100644 --- a/jso/apis/src/main/java/org/teavm/jso/browser/Window.java +++ b/jso/apis/src/main/java/org/teavm/jso/browser/Window.java @@ -93,7 +93,7 @@ public abstract class Window implements JSObject, WindowEventTarget, StorageProv return prompt(message, ""); } - @JSBody(params = { "message", "defaultValue" }, script = "prompt(message, defaultValue);") + @JSBody(params = { "message", "defaultValue" }, script = "return prompt(message, defaultValue);") public static native String prompt(String message, String defaultValue); @JSBody(params = { "handler", "delay" }, script = "return setTimeout(handler, delay);") From 8d409b9a2b1c46bd85c35852281347505fd0612c Mon Sep 17 00:00:00 2001 From: jfwittmann Date: Wed, 21 Oct 2015 14:45:10 +0200 Subject: [PATCH 2/2] Fix bug in Window. Add return statement to JSBody script for prompt(message,defaultValue) --- jso/apis/src/main/java/org/teavm/jso/browser/Window.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jso/apis/src/main/java/org/teavm/jso/browser/Window.java b/jso/apis/src/main/java/org/teavm/jso/browser/Window.java index bbd12ceff..8c1f4b872 100644 --- a/jso/apis/src/main/java/org/teavm/jso/browser/Window.java +++ b/jso/apis/src/main/java/org/teavm/jso/browser/Window.java @@ -93,7 +93,7 @@ public abstract class Window implements JSObject, WindowEventTarget, StorageProv return prompt(message, ""); } - @JSBody(params = { "message", "defaultValue" }, script = "prompt(message, defaultValue);") + @JSBody(params = { "message", "defaultValue" }, script = "return prompt(message, defaultValue);") public static native String prompt(String message, String defaultValue); @JSBody(params = { "handler", "delay" }, script = "return setTimeout(handler, delay);")