在iframe下的IE11怪癖模式 - javascript错误 [英] IE11 quirks mode under Iframe - javascript errors

查看:160
本文介绍了在iframe下的IE11怪癖模式 - javascript错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读并寻找几天的答案而且找不到答案,希望这个帖子能带来救赎:))



在我的公司我们有一个网络应用程序那是在IE8上工作。
我们正在尝试迁移到IE11。
我们差不多了,但是,
我们有一个旧模块,用旧框架编写,托管在iframe中并以quirks模式运行(用meta http-equiv =X-UA-Compatible定义 content =IE = emulate7或IE = 5,我试过两个)。
只要父/主窗口以IE8文档模式(通过x-ua兼容元标记)或企业模式呈现,iframe就可以正常工作。



但是一旦我将父/主窗口更改为IE = 9及更高版本,我就会从子iframe中获取javascript错误(超出我的处理范围)。



<我明白IE11使用模拟器进行怪异模式,而不是真正的引擎,但是我无法找到有关javascript引擎的任何细节。
这是否意味着如果呈现父主窗口是IE9及更高版本,子iframe将使用ECMAscript 5而不是jscript,应该使用它?



是我的问题有什么解决方案吗?
谢谢大家!

解决方案

从IE10开始,子模式 可以不同



查看此链接。它说......


IE9 mode以标准模式显示子帧(因为
父文档处于标准模式)。但是,从Internet Explorer
10开始,子帧可以模拟怪异模式。有关详细信息,请参阅
IEBlog:HTML5 Quirks 模式。但是,为了获得最佳效果,请始终使用
文档模式。



I am reading and looking for answer for days and couldn't found one, hopefully this thread will bring salvation :)

In my company we have a web app that is working on IE8. We are trying to migrate to IE11. We almost there but, We have an old module that is written in an old framework that is hosted in an iframe and running in quirks mode(define with meta http-equiv="X-UA-Compatible" content="IE=emulate7" or IE=5, I tried both). As long as the parent/main window is rendered in IE8 document mode (via x-ua-compatible meta tag) or in enterprise mode, the iframe works fine.

But as soon as I change the parent/main window to IE=9 and above, I get javascript errors from the child iframe (more than I can handle).

I understand that IE11 uses emulator for quirks mode and not the real engine, but I can not find anywhere details about the javascript engine. Does this mean that if the parent main window is rendered is IE9 and above, the child iframe will use ECMAscript 5 and not jscript as it should?

is there any solution to my problem? thanks guys!

解决方案

Starting with IE10, the child mode can be different from the parent.

See this link. It says...

IE9 mode displays the child frame in standards mode (because the parent document is in standards mode). Starting with Internet Explorer 10, however, child frames can emulate quirks mode. For more info, see IEBlog: HTML5 Quirks mode in IE10. For best results, however, use document modes consistently.

这篇关于在iframe下的IE11怪癖模式 - javascript错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆