Java 8 Update 91 Issue
Java 8 Update 91 Issue
使用isActive()方法初始化小程序时。它只返回undefined。这个问题只出现在"Java 8更新91"中。有人能告诉我是否加载了精细小程序的解决方案吗?
我使用了以下代码:
function isAppletActive(app) {
var active = false;
try { active = app.isActive(); // IE check }
catch(ex) {
try { active = app.isActive; // Firefox check }
catch(ex1){ } } //alert(active); return active;
}
这是Firefox(很可能)或Java 8_91中的一个错误。似乎任何对小程序方法的过早调用都会永久性地连接到小程序。
但是,小程序支持有一个用于检查小程序状态的新功能,通过设置参数<param name="java_status_events" value="true"/>
启用。这反过来又允许在加载小程序时检查status
。如果启用此功能,并使用它来防止在加载小程序之前调用任何小程序方法,则一切都可以。
function isAppletActive(app) {
// assuming `app` is the applet element...
if(app.status==1) { return false; } // still loading
if(app.status==2) { throw "Applet load failed"; }
try { active = app.isActive(); } // IE check
catch(ex) {
try { active = app.isActive; } // Firefox check
catch(ex1) { /* NEVER swallow exceptions! */ }
}
//alert(active);
return active;
}
顺便说一句,Firefox使用的是app.isActive()
,而不是app.isActive
,尽管谁知道它过去做了什么。
相关文章:
- issue with FB.Event.subscribe
- chrome.tabs.update() 重定向到 'chrome-extension://invalid/'
- 使用Jquery Issue垂直重新排序Divs
- 在node.js-mysql中执行UPDATE查询不起作用
- 创建了一个选项卡,但点击时不会起作用-jQuery issue/newbie
- Underscore each to update collection
- jQuery find() Issue
- $route.reload(); Issue
- PHP json_encode issue
- Three.js issue creating meshes outside of loader's load(
- Jquery :gt(value) issue
- pickaday maxDate issue
- Stage.load(json) Issue..Kinetic.js
- Visual Studio 2015 Update 2-'中的TypeScript模块;要求'未定义
- Mootools Selector issue
- Java 8 Update 91 Issue
- JS parseInt() issue
- Jquery Colorbox issue with firefox
- Javascript firefox issue
- Jquery ajax update issue with chrome