Skip to content

Commit

Permalink
$mol_range: common container
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jan 8, 2025
1 parent 5aa2b28 commit 9d5de0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dom/range/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ namespace $ {
static around( node: Node ) {
return $mol_dom_range.inside( node ).expand()
}

container() {
return this.native().commonAncestorContainer
}

is_empty() {
return this.anchor.node === this.extend.node && this.anchor.pos === this.extend.pos
Expand Down

0 comments on commit 9d5de0f

Please sign in to comment.