Skip to content

Commit f0cb0ee

Browse files
hansonrhansonr
authored andcommitted
adds JSObject support for JSApplet/Applet
1 parent 4102acb commit f0cb0ee

File tree

1 file changed

+9
-0
lines changed
  • sources/net.sf.j2s.java.core/src/netscape/javascript

1 file changed

+9
-0
lines changed

sources/net.sf.j2s.java.core/src/netscape/javascript/JSObject.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import java.applet.Applet;
1818
import java.applet.AppletContext;
19+
import java.applet.JSApplet;
1920

2021
/**
2122
*
@@ -252,4 +253,12 @@ public static JSObject getWindow(Applet applet) throws JSException {
252253
jsobject.obj = /** @j2sNative context.html5Applet._window || */ null;
253254
return jsobject;
254255
}
256+
257+
public static JSObject getWindow(JSApplet applet) throws JSException {
258+
JSObject jsobject = new JSObject();
259+
@SuppressWarnings("unused")
260+
AppletContext context = applet.getAppletContext();
261+
jsobject.obj = /** @j2sNative context.html5Applet._window || */ null;
262+
return jsobject;
263+
}
255264
}

0 commit comments

Comments
 (0)