Calling the Selection.toString() method returns the text contained in the selection, e.g.:
This method functions identically to the Window.getSelection() method; it returns a Selection object representing the text currently selected in the document.
The Selection.collapse() method collapses the current selection to a single point. The document is not modified. If the content is focused and editable, the caret will blink there.
The Selection.containsNode() method indicates if the node is part of the selection.
The Selection.modify() method applies a change to the current selection or cursor position, using simple textual commands.
The Selection.removeAllRanges() method removes all ranges from the selection, leaving the anchorNode and focusNode properties equal to null and leaving nothing selected.
The HTMLInputElement.setSelectionRange() method sets the start and end positions of the current text selection in an <input> element.
The Selection.collapseToEnd() method collapses the selection to the end of the last range in the selection.  If the content of the selection is focused and editable, the caret will blink there.
The Selection.collapseToStart() method collapses the selection to the start of the first range in the selection.  If the content of the selection is focused and editable, the caret will blink there.
The Selection.deleteFromDocument() method deletes the actual text being represented by a selection object from the document's DOM.
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.
The Selection.getRangeAt() method returns a range object representing one of the ranges currently selected.
The Selection.removeRange() method removes a range from the selection.
The Selection.selectAllChildren() method adds all the children of the specified node to the selection. Previous selection is lost.
The Selection.toString() method returns a string currently being represented by the selection object, i.e. the currently selected text.
The Selection.anchorNode read-only property returns the Node in which the selection begins.
The Selection.anchorOffset read-only property returns the number of characters that the selection's anchor is offset within the Selection.anchorNode.
Selection.focusNode read-only property returns the Node, in which selection ends.
The Selection.focusOffset read-only property returns the number of characters that the selection's focus is offset within the Selection.focusNode.