开发者

Applet causing error

开发者 https://www.devze.com 2023-02-21 22:14 出处:网络
I add an applet to the html page in my extension. The following line of code raises an exception: try {

I add an applet to the html page in my extension. The following line of code raises an exception:

    try {
        document.Applet.isActive();
    }
    catch(e) {
开发者_Python百科        setTimeout(doingSomeThing(),200);
        return;
    }

Error: Attempt to call a default method on object with no invokeDefault method

And after a while:

TypeError: document.Applet.isActive is not a function

I am testing the extension on different OS and firefox versions for deployment. The above error occurred on Firefox 4.0 on a Mac OS X machine running Java 1.6.0_22.

It tested it with Java version 1.6.0_24 on Mac OS X and it worked fine.

Any ideas regarding this?

Update: I am attaching the Java console output on 1.6.0_22

security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws,com.sun.deploy
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws,com.sun.deploy
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value null
security: property package.definition new value com.sun.javaws
security: property package.definition value com.sun.javaws
security: property package.definition new value com.sun.javaws,com.sun.deploy
security: property package.definition value com.sun.javaws,com.sun.deploy
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,apple.,com.apple.mrj.,com.apple.jdirect.,com.apple.audio.jdirect.,quicktime.internal.,com.sun.medialib.mlib.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
basic: Told clients applet is started
Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04-307-10M3261 Java HotSpot(TM) 64-Bit Server VM User home directory = /Users/tomrTrace level set to 5: all… completed.
basic: Starting applet teardown
basic: Finished applet teardown
basic: Told clients applet is started

Thanks,


Have a close look over Detect if an Applet is ready - Real's HowTo. It seems more complicated than a single line of JavaScript.

0

精彩评论

暂无评论...
验证码 换一张
取 消