smartxml: TextNodes don't contain other nodes - let them state that
[fnpeditor.git] / src / smartxml / smartxml.js
index 08897cc..e2cdc9b 100644 (file)
@@ -79,6 +79,10 @@ $.extend(DocumentNode.prototype, {
         return this.document.root.sameNode(this);
     },
 
+    isInDocument: function() {
+        return this.document.containsNode(this);
+    },
+
     isSiblingOf: function(node) {
         return node && this.parent().sameNode(node.parent());
     },
@@ -243,6 +247,11 @@ $.extend(TextNode.prototype, {
         return this.nativeNode.data;
     },
 
+
+    containsNode: function() {
+        return false;
+    },
+
     triggerTextChangeEvent: function() {
         var event = new events.ChangeEvent('nodeTextChange', {node: this});
         this.document.trigger('change', event);