2011-04-07 55 views
1

我在我的擴展中的html頁面中添加一個小程序。下面的代碼行拋出一個異常:Firefox 4中的Applet問題

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

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

過了一段時間:

TypeError: document.Applet.isActive is not a function

我測試在不同的操作系統和Firefox版本部署的擴展。上述錯誤發生在運行Java 1.6.0_22的Mac OS X機器上的Firefox 4.0上。

它在Mac OS X上使用Java版本1.6.0_24進行了測試,並且它工作正常。

對此有何想法?

更新:我附上關於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 

由於Java控制檯輸出,

回答

1

看一看在Detect if an Applet is ready更復雜,扔JS單行進入HTML在一些隨機點。

如果找過該文件不排序爲你的問題,我建議你準備&後的SSCCE和URL到一個地方,我們可以看到小程序的工作/失敗。