对象不支持对象IE 8
object doesnt support object IE 8
当我想最小化extjs窗口时,它在IE8中不起作用。所有其他浏览器都很好。我得到的错误是指向一条包含以下内容的行:
iframe.dom.hasOwnProperty
这是不是对IE8不起作用?
还有
iframe.dom.contentWindow.parentLostFocus();
IE中的错误只是说:对象不支持对象。不确定可能是什么问题。有人知道吗?
这是的焦点
iframe = Ext.get('iframe_{0}'.sprintf(item.itemId));
if(!iframe.dom.hasOwnProperty('contentWindow')) {
return;
}
if(iframe !== null && iframe.dom && iframe.dom.contentWindow && iframe.dom.contentWindow.parentGotFocus) {
context.trace('calling parentGotFocus in iframe {0}'.sprintf(item.itemId));
iframe.dom.contentWindow.parentGotFocus();
} else {
context.trace('function parentGotFocus not found in iframe {0}'.sprintf(item.itemId));
}
},
IE8及更低版本不支持DOM元素的hasOwnProperty()
。如果iframe.dom
是DOM Node对象,则IE8抛出错误"object不支持属性或方法"。为了避免错误,尝试替换:
iframe.dom.hasOwnProperty("property name");
带有:
Object.prototype.hasOwnProperty.call(iframe.dom,"property name");
相关文章:
- 对象不支持属性或方法“自动完成”
- 对象不支持对象IE 8
- 如何从 MVC4 链接调用 Javascript 方法(错误 JavaScript 运行时错误:对象不支持此操作)
- JSHint 错误“对象不支持此属性或方法”用于 javascript 闭包
- 对象不支持属性或方法“确认”
- 对象不支持属性或方法“jscomp_symbol_iterator0”
- 对象不支持 igGrid 中的属性或方法“_super”
- 下拉 Javascript 错误:对象不支持属性或方法“匹配”
- 运行时错误:对象不支持属性或方法
- 对象不支持在调用 indexOf 定义的数组时 IE8 中未定义的此属性或方法
- 对象不支持此属性或方法 Rails Windows 64 位
- IE9:对象不支持属性“is”
- Jquery说该对象不支持“每个”
- 对象不支持 IE7 jQuery 中的此属性或方法错误
- 对象不支持此属性或方法“同位素”
- 对象不支持此属性或方法 - IE 7/8
- IE 错误 .JavaScript 运行时错误:对象不支持属性或方法“preventDefault”
- 使用此 javascript 在 IE7 中收到“对象不支持此属性或方法”错误,以及选项卡未正确定位的问题
- 在 IE6 中运行时添加 CSS 规则 - 对象不支持此属性或方法
- 对象不支持属性或方法“jtable”