小程序导致错误

发布于 2024-10-30 12:16:33 字数 3578 浏览 0 评论 0原文

我向扩展中的 html 页面添加了一个小程序。以下代码行引发异常:

    try {
        document.Applet.isActive();
    }
    catch(e) {
        setTimeout(doingSomeThing(),200);
        return;
    }

错误:尝试在没有 invokeDefault 方法的情况下调用对象的默认方法

一段时间后:

类型错误:document.Applet.isActive 不是函数

我正在不同操作系统和 Firefox 版本上测试扩展以进行部署。上述错误发生在运行 Java 1.6.0_22 的 Mac OS X 计算机上的 Firefox 4.0 上。

它在 Mac OS X 上使用 Java 版本 1.6.0_24 进行了测试,并且运行良好。

对此有什么想法吗?

更新:我附上了 1.6.0_22 上的 Java 控制台输出,

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

谢谢,

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) {
        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,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寻梦旅人 2024-11-06 12:16:33

仔细查看检测 Applet 是否已就绪 - Real 的操作方法。它看起来比一行 JavaScript 更复杂。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文