Selection: extend() method
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
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.
Syntax
js
extend(node)
extend(node, offset)
Parameters
Return value
None (undefined
).
Specifications
Specification |
---|
Selection API # dom-selection-extend |
Browser compatibility
BCD tables only load in the browser
See also
Selection
, the interface it belongs to.