clearSelections function
void
clearSelections()
Clears selected text in vieport.
Implementation
void clearSelections() {
var selection = window.getSelection();
if (selection != null) {
selection.removeAllRanges();
}
}