dist/dom-selection.es.js
function setRange(saved, sel) {
	if (!saved) { return; }
	// will make new selection, if unset
	sel = sel || getSelection();
	sel.removeAllRanges();
	sel.addRange(saved);
}
function setRange(saved, sel) {
	if (!saved) { return; }
	// will make new selection, if unset
	sel = sel || getSelection();
	sel.removeAllRanges();
	sel.addRange(saved);
}
function setRange ( saved , sel ) { if ( ! saved ) { return ; } // will make new selection, if unset sel = sel || getSelection ( ) ; sel . removeAllRanges ( ) ; sel . addRange ( saved ) ; }
Restore a Selection Range
@see http://stackoverflow.com/questions/13949059/persisting-the-changes-of-range-objects-after-selection-in-html/13950376#13950376
@param {Range} saved
@param {Selection} sel
Restore a Selection Range