小程序导致错误
我向扩展中的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仔细查看检测 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.