Opened 11 years ago
Last modified 11 years ago
#11649 closed Bug
node.js: cross domain getPrarent() permission access denied error — at Initial Version
Reported by: | Feng | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Hi CKEditor team,
So we iframed a page using CKEditor in another page with different domain. Since getParent() in core/dom/noide.js could try to access the parent of this.$ (which could be a "document" level node) that will give access denied permission error.
I would suggest below code: {code}
getParent: function( allowFragmentParent ) {
var parent; try{
parent = this.$.parentNode;
} catch(err){
for no permission to access the parentNode parent = null;
}
return ( parent && ( parent.nodeType == CKEDITOR.NODE_ELEMENT allowFragmentParent && parent.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ) ) ? new CKEDITOR.dom.node( parent ) : null; },
{code}