87,901
社区成员
发帖
与我相关
我的任务
分享
getCursorSelect: function(){
if (this.iframeDoc.selection) {
this.selection = this.iframeDoc.selection;
this.range = this.selection.createRange();
try {
this.parent = this.range.parentElement();
} catch (e) {
return;
}
} else {
try {
this.selection = this.iframe.contentWindow.getSelection();
} catch (e) {
return;
}
this.range = this.selection.getRangeAt(0);
this.parent = this.range.commonAncestorContainer;
if(this.parent.nodeName == "#text") {
this.parent = this.parent.parentNode;
}
}
},