smartxml: RangeFragment.hasSameBoundries
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 3 Jul 2014 13:48:57 +0000 (15:48 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 14 Aug 2014 14:26:12 +0000 (16:26 +0200)
src/smartxml/fragments.js

index b1befdf..d932592 100644 (file)
@@ -79,6 +79,9 @@ $.extend(RangeFragment.prototype, {
     hasSiblingBoundries: function() {
         return this.isValid() && this.startNode.isSiblingOf(this.endNode);
     },
     hasSiblingBoundries: function() {
         return this.isValid() && this.startNode.isSiblingOf(this.endNode);
     },
+    hasSameBoundries: function() {
+        return this.isValid() && this.startNode.sameNode(this.endNode);
+    },
     boundriesSiblingParents: function() {
         return this.startNode.document.getSiblingParents({
             node1: this.startNode,
     boundriesSiblingParents: function() {
         return this.startNode.document.getSiblingParents({
             node1: this.startNode,