// remove any handlers that might be hanging around from an earlier instance
try
{
- if (getAppletContext() instanceof sun.plugin.javascript.JSContext) {
- if (debug)
- {
- System.err.println("Applet context implements JSContext - should have callback support!");
- }
+ if (debug)
+ {
+ System.err.println("Applet context is '"+getAppletContext().getClass().toString()+"'");
+ }
+ JSObject scriptObject = JSObject.getWindow(this);
+ if (debug && scriptObject!=null)
+ {
+ System.err.println("Applet has Javascript callback support.");
}
- JSObject scriptObject = JSObject.getWindow(this);
+
} catch (Exception ex)
{
System.err