web api instance method
Selection: extend() method
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
extend(node)
extend(node, offset)
Parameters
node- : The node within which the focus will be moved.
offsetOptional- : The offset position within
nodewhere the focus will be moved to. If not specified, the default value0is used.
- : The offset position within
Return value
None (undefined).
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
Selection, the interface it belongs to.