简体   繁体   English

iframe中的Silverlight 5应用未在IE9中关闭

[英]Silverlight 5 app from iframe not closing in IE9

I am developing a web application using Dojo v1.8 and my target machine runs IE9 and Silverlight 5.1.20125. 我正在使用Dojo v1.8开发Web应用程序,并且目标计算机运行IE9和Silverlight 5.1.20125。 In this web app, the user can select a tool from a toolbar at the top of the page that will open up in a content pane (or an IFrame if it is an external tool) below the toolbar (only one tool can run at a time). 在此网络应用中,用户可以从页面顶部的工具栏中选择一个工具,该工具将在工具栏下方的内容窗格(如果是外部工具,则为IFrame)中打开(只有一个工具可以在工具栏上运行)。时间)。

The bug I am encountering is that one of the external tools that opens in an IFrame runs a Silverlight app, and if the user tries to select another tool, the new tool won't open and the Silverlight application stays there. 我遇到的错误是,在IFrame中打开的外部工具之一正在运行Silverlight应用程序,并且如果用户尝试选择其他工具,则新工具将不会打开,而Silverlight应用程序将停留在该位置。 After checking the DOM Tree, all references to the Silverlight application have been wiped, and the new tool is there instead (which is the desired behavior). 在检查DOM树之后,所有对Silverlight应用程序的引用都已被擦除,而是使用了新工具(这是所需的行为)。

So my question is, why is the Silverlight Application still being viewed even when it is gone from the DOM Tree, and is there a way to programmatically close it from Javascript? 所以我的问题是,即使从DOM树中删除了Silverlight应用程序,为什么仍然可以查看它,并且有没有办法从Javascript中以编程方式关闭它? Also, I do NOT have access to the source code of the Silverlight Application. 另外,我无权访问Silverlight应用程序的源代码。

Well I did not manage to solve this issue directly. 好吧,我没有设法直接解决这个问题。 However, there was another bug that I ran into which involved the java swing library not working on the production machine. 但是,我遇到了另一个错误,该错误涉及java swing库在生产机器上不起作用。 The solution was to add the following tag as the first element of head: 解决方案是将以下标签添加为head的第一个元素:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8>

This forces IE to use IE8 instead of IE9. 这迫使IE使用IE8而不是IE9。 This trick solved this other issue, but inadvertently solved this issue as well. 这个技巧解决了另一个问题,但是也无意中解决了这个问题。 Here are several links that helped lead me to the solution (amongst others): http://sourceforge.net/p/djproject/discussion/671154/thread/d7662f61 http://msdn.microsoft.com/en-us/ie/ff959805.aspx#_Compatibility_issues_with_1 以下是一些帮助我找到该解决方案的链接(包括其他链接): http : //sourceforge.net/p/djproject/discussion/671154/thread/d7662f61 http://msdn.microsoft.com/zh-cn/ie /ff959805.aspx#_Compatibility_issues_with_1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM