aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/source-range.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-07-23 13:06:09 -0700
committerAlex Yatskov <alex@foosoft.net>2016-07-23 13:06:09 -0700
commita72e958ebf143464f4cd8df90d48f3268aeeea94 (patch)
tree0dc06750490c637e48b2f1b9ae6458e1b52696ef /ext/fg/js/source-range.js
parenta889e1ffaa8b64b18a5b8416db1838ab497f52d6 (diff)
Support looking up image tags
Diffstat (limited to 'ext/fg/js/source-range.js')
-rw-r--r--ext/fg/js/source-range.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/source-range.js b/ext/fg/js/source-range.js
index a6c3d722..bd13a1b6 100644
--- a/ext/fg/js/source-range.js
+++ b/ext/fg/js/source-range.js
@@ -63,8 +63,8 @@ class RangeSource {
selection.removeAllRanges();
}
- compareOrigin(range) {
- return range.rng.compareBoundaryPoints(Range.START_TO_START, this.rng);
+ equals(other) {
+ return other.rng && other.rng.compareBoundaryPoints(Range.START_TO_START, this.rng) == 0;
}
static seekEnd(node, length) {