问题描述
我正在为社交网络开发一款可在IFrame
中运行的应用程序.该应用程序在Google Chrome和Microsoft Firefox浏览器中正常运行,但是在Opera 12.15 JQuery库v1.10.1中无法加载,并在 1513 行上显示安全错误Unhandled error: Security error: attempted to read protected variable
.
I am developing an app for social network which works in IFrame
. The app works just fine in Google Chrome and Microsoft Firefox browsers, but in Opera 12.15 JQuery library v1.10.1 fails to load with security error Unhandled error: Security error: attempted to read protected variable
on line 1513.
屏幕截图在这里:
Internet Explorer 10中似乎存在相同的错误.
It looks like the same bug exists in Internet Explorer 10.
如何处理?
更新:
我通过注释 jquery :
// Support: IE>8
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
/*if ( parent && parent.frameElement ) {
parent.attachEvent( "onbeforeunload", function() {
setDocument();
});
}*/
我的应用程序的功能现在似乎可以正常工作,也许有必要在JQuery存储库中创建问题...
The functionality of my app seems to work now, maybe it is necessary to create issue in JQuery repo...
推荐答案
已创建错误报告- http://bugs.jquery.com/ticket/13980 .错误现已修复.
Bug report was created - http://bugs.jquery.com/ticket/13980.Bug is now fixed.
这篇关于Opera和Internet Explorer中的jQuery安全错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!