83. selectAt

Parameter syntax:

[ 'begin'|'extend'|'end' ]?
begin

Cancels text or node selection if any. Moves caret to character clicked upon, if such character exists.

extend

If caret was moved by previous "selectAt begin", extends text selection to the character clicked upon.

end

If caret was moved by previous "selectAt begin", does nothing, otherwise selects node clicked upon.

Parameter is absent

Cancels text or node selection if any. Extends or creates a text selection:

  • The beginning of the new text selection is the beginning of old text selection if any, or caret position otherwise.

  • The end of the new text selection is the character clicked upon.