1
我在IE11窗口用window.open打开抛出“对象不支持属性或方法”在IE的newWindow.addEventListener(“加载”,回调,真)
工作我有一个代码这会打开一个新窗口并在新窗口中为加载事件添加一个eventListener。
var newWindow = window.open(someURL, ..., ...);
newWindow.addEventListener('load', callback, true);
// when IE11 executes this line, it throws error "object doesn't support property or method".
当我打开调试器问题的路线,newWindow对象在其方法列表中列出的addEventListener方法。
有人可以建议或解释在IE11中的行为的可能原因。
一些研究 - 我发现了一个问题,其中newWindow不允许您在父窗口中使用appendChild和元素。 appendChild not working with window.open in IE
类似的事情会是一个问题吗?
尝试'newWindow.onload =函数(){..};' – d3vi4nt
其他在这里提到:http://stackoverflow.com/questions/3030859/ – d3vi4nt
指向此处:http://stackoverflow.com/questions/25098021/ – d3vi4nt