smartxml: DocumentNode.getIndex function for syntactic sugar
[fnpeditor.git] / src / smartxml / smartxml.js
index b469068..b4036d3 100644 (file)
@@ -78,6 +78,10 @@ $.extend(DocumentNode.prototype, {
           insertion.insertsNew = true;
         }
         return insertion;
+    },
+
+    getIndex: function() {
+        return this.parent().indexOf(this);
     }
 });