aboutsummaryrefslogtreecommitdiffstats
path: root/tests/reproducers/simple/JavascriptURLProtocol/srcs/JavascriptProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reproducers/simple/JavascriptURLProtocol/srcs/JavascriptProtocol.java')
-rw-r--r--tests/reproducers/simple/JavascriptURLProtocol/srcs/JavascriptProtocol.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/reproducers/simple/JavascriptURLProtocol/srcs/JavascriptProtocol.java b/tests/reproducers/simple/JavascriptURLProtocol/srcs/JavascriptProtocol.java
new file mode 100644
index 0000000..073f166
--- /dev/null
+++ b/tests/reproducers/simple/JavascriptURLProtocol/srcs/JavascriptProtocol.java
@@ -0,0 +1,22 @@
+import java.applet.Applet;
+import java.net.URL;
+import netscape.javascript.JSObject;
+
+public class JavascriptProtocol extends Applet {
+ public String state = "HasntRun";
+ @Override
+ public void start() {
+ try {
+ getAppletContext().showDocument(new URL("javascript:runSomeJS()"));
+ System.out.println("State after showDocument was " + state);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("*** APPLET FINISHED ***");
+ }
+ // Utility for JS side
+ public void print(String s) {
+ System.out.println(s);
+ }
+}
+