extend

fun extend(node: Node, offset: Int = definedExternally)(source)

The Selection.extend() method moves the focus of the selection to a specified point. The anchor of the selection does not move. The selection will be from the anchor to the new focus, regardless of direction.

MDN Reference