Permission denied to access property 'dom' from a non-chrome context
2013-04-30 17:44
295 查看
这几天在做Ext的时候,用firefug调试程序的时候老是提示错误,错误信息如下:
Permission denied to access property 'dom' from a non-chrome context
上网google了一下,中文的解析没找到,经过一番折腾,在一个老外的帖子里了解到一知半解。似乎只是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方法就行了。
(转载:http://www.cnblogs.com/lwjacky/archive/2009/11/02/1594508.html)
Permission denied to access property 'dom' from a non-chrome context
上网google了一下,中文的解析没找到,经过一番折腾,在一个老外的帖子里了解到一知半解。似乎只是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方法就行了。
(转载:http://www.cnblogs.com/lwjacky/archive/2009/11/02/1594508.html)
相关文章推荐
- Permission denied to access property 'dom' from a non-chrome context
- Permission denied to access property 'dom' from a non-chrome context
- Ext报错:Permission denied to access property 'dom' from a non-chrome context
- JS报错:Permission denied to access property 'document'---document.domain - JavaScript的同源策略问题
- <context:property-placeholder>导致的 Access denied for user ''@'localhost' to database 问题
- JS报错:Permission denied to access property 'document'---document.domain - JavaScript的同源策略问题
- document.domain - JavaScript的同源策略问题:错误信息:Permission denied to access property 'document'_eecc00_百度空间
- 报错 Error: Permission denied to access property "href"
- js 遇到 Permission denied to access property ***
- JS报错:Permission denied to access property 'document'---document.domain - JavaScript的同源策略问题
- JS报错:Permission denied to access property 'document'---document.domain - JavaScript的同源策略问题
- NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
- EL1057E: No bean resolver registered in the context to resolve access to bean 'permissionService'
- firefox NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
- remote: Permission to xxxxx/javaeelzw.git denied to xxxx. fatal: unable to access 'https://git
- Gaining Access to the Spring Context in Non Spring Managed Classes
- Permission denied You (root) are not allowed to access to (crontab) because of pam configuration.
- SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”
- Error: Permission denied to set property XULElement.selectedIndex Source File
- How to obtain access to an ActiveX control from its property page 如何从一个控件的属性页中获取对该控件的访问?