From: Aleksander Ɓukasz Date: Fri, 25 Oct 2013 13:32:03 +0000 (+0200) Subject: smartxml: DocumentNode.getIndex function for syntactic sugar X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/b5b63aaa73c53f6ba8091c8e8662ff478a1ecca7?ds=sidebyside;hp=02ea7eed98a6826504c4472a9309010277026a03 smartxml: DocumentNode.getIndex function for syntactic sugar --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index b469068..b4036d3 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -78,6 +78,10 @@ $.extend(DocumentNode.prototype, { insertion.insertsNew = true; } return insertion; + }, + + getIndex: function() { + return this.parent().indexOf(this); } });