fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: Handle hitting backspace/delete on arbitrary selection
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
8bf531b
..
d87ec54
100644
(file)
--- a/
src/smartxml/smartxml.js
+++ b/
src/smartxml/smartxml.js
@@
-203,6
+203,10
@@
$.extend(ElementNode.prototype, {
return toret;
},
return toret;
},
+ containsNode: function(node) {
+ return node && (node.nativeNode === this.nativeNode || node._$.parents().index(this._$) !== -1);
+ },
+
toXML: function() {
var wrapper = $('<div>');
wrapper.append(this._getXMLDOMToDump());
toXML: function() {
var wrapper = $('<div>');
wrapper.append(this._getXMLDOMToDump());
@@
-354,7
+358,7
@@
$.extend(Document.prototype, Backbone.Events, {
},
containsNode: function(node) {
},
containsNode: function(node) {
- return this.root &&
(node.nativeNode === this.root.nativeNode || node._$.parents().index(this.root._$) !== -1
);
+ return this.root &&
this.root.containsNode(node
);
},
getSiblingParents: function(params) {
},
getSiblingParents: function(params) {