只有在ie8 /9的iframe内,GWT应用程序才会失败

GWT application fails only when inside iframe in IE 8/9

本文关键字:GWT 应用程序 失败 iframe ie8      更新时间:2023-09-26

我有一个GWT应用程序,应该通过iframe嵌入客户的网站。

在MSIE 9及以下版本中,我得到"抛出异常但未捕获",并且iframe为空。

链接到带有破碎iframe的页面:http://vuecaremedia.com/test-embedded/single.html

URL到iframe内容本身,这是有效的:http://licensing.vuecaremedia.com/portal/?embed=32afc25c e821 - 4 - c03 - 933 c - d8b38c349eb1&视频= 8

如果我使用IE开发工具并将文档模式更改为Internet Explorer 9标准,它就可以工作了!但是这些都失败了:

怪异模式

Internet Explorer 7标准

Internet Explorer 8标准

在IE中,容器页和iframe都应该使用相同的doctype,否则iframe会继承其父的doctype。

所以你必须要求你的客户将此包含在他们的托管页面中:

<!doctype html>

看来问题不在于框架本身,而在于您正在使用的视频插件。注意到JW Player在IE7和IE8中有一些奇怪的行为,特别是在使用旧版本的Flash时。

我不是JW播放器的专家,但你可能想把这个问题发布到http://www.longtailvideo.com/support/forums/jw-player。我试过使用怪癖模式使用URL,它不工作。

并且,http://licensing.vuecaremedia.com/portal/?embed=32afc25c-e821-4c03-933c-d8b38c349eb1&video=8上的视频页面实际上声明不支持Quirks模式:

<!doctype html>
<!-- The DOCTYPE declaration above will set the     -->
<!-- browser's rendering engine into                -->
<!-- "Standards Mode". Replacing this declaration   -->
<!-- with a "Quirks Mode" doctype is not supported. -->