Permission denied to access property 'dom' from a non-chrome context
2009-11-02 14:21
447 查看
这几天在做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方法就行了。
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方法就行了。
相关文章推荐
- 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的同源策略问题
- JS报错:Permission denied to access property 'document'---document.domain - JavaScript的同源策略问题
- JS报错:Permission denied to access property 'document'---document.domain - JavaScript的同源策略问题
- 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.domain - JavaScript的同源策略问题:错误信息:Permission denied to access property 'document'_eecc00_百度空间
- 报错 Error: Permission denied to access property "href"
- How to obtain access to an ActiveX control from its property page 如何从一个控件的属性页中获取对该控件的访问?
- SQL Agent Job 报“Access to the remote server is denied because the current security context is not trusted”
- 解决FF中的bug:JavaScript focus() throws "Permission denied to get property XULElement.selectedIndex"
- 郁闷的异常 uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
- You need permission to perform this action access denied解决
- Permission denied You (root) are not allowed to access to (crontab) because of pam configuration.
- uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
- firefox NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
- GIT ERROR: Permission to ********.git denied to deploy key fatal: Could not read from remot