您的位置:首页 > 运维架构

Permission denied to access property 'dom' from a non-chrome context

2010-09-02 11:01 351 查看
似乎只是firefug的的一个bug,3.5版本的火狐就会有这个问题,由于网络延迟的问题,dom就出现了问题。解决方法如下:

Ext.override(Ext.Element, {

contains: function() {

var isXUL = Ext.isGecko ? function(node) {

return Object.prototype.toString.call(node) == '[object XULElement]';

} : Ext.emptyFn;

return function(el) {

return !this.dom.firstChild || // if this Element has no children, return false immediately

!el ||

isXUL(el) ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);

};

}()

});

复写Ext的Element方法就行了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐