window.open在IE8保护模式下返回null [英] window.open returns null in IE8 Protected Mode

查看:765
本文介绍了window.open在IE8保护模式下返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图捕获window.open()的返回值,但它返回null / undefined。当IE8保护模式打开时会发生这种情况。是否有任何altenative来获取window.open()返回对象而不禁用IE8中的受保护模式?

I am trying to catch the return value of window.open(), but it is returning null/undefined. This happens when IE8 Protected mode is turned ON. Is there any altenative to get the window.open() returned object without disabling the protected Mode in IE8?

推荐答案

你是试图执行其中一项保护模式是专门设计为停止......

You're trying to perform one of the things Protected Mode is specifically designed to stop...

来自Microsoft - open method

From Microsoft -- open method:


从应用程序(Internet Explorer进程除外)打开一个新窗口可能会导致返回值为null。出现此限制是因为默认情况下Internet Explorer以受保护模式运行。受保护模式的一个方面可防止应用程序在访问跨越进程边界时具有对Internet Explorer的特权访问权限。使用此方法打开一个新窗口会生成一个新进程。有关受保护模式的详细信息,请参阅
了解并在保护模式下使用Internet Explorer 。这通常发生在承载WebBrowser控件的应用程序中。

Opening a new window from an application (other than the Internet Explorer process) may result in a null return value. This restriction occurs because Internet Explorer runs in protected mode, by default. One facet of protected mode prevents applications from having privileged access to Internet Explorer when that access spans process boundaries. Opening a new window by using this method generates a new process. For more information about protected mode, see Understanding and Working in Protected Mode Internet Explorer. This commonly occurs for applications that host the WebBrowser control.

如果您正在寻找执行类似操作的方法,那么我们将会需要确切地知道你在做什么,以及你如何尝试使用window.open。

If you're looking for a way to perform similar, then we'll need to know exactly what your doing and how your attempting to use window.open.

尽管如此,这可能是一个特定于编程的问题,这将是关闭SU的主题。

Most likely though, that would be a programming-specific problem, which would be off-topic for SU.

这篇关于window.open在IE8保护模式下返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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