seleccion
A
getSelection
polyfill and asetSelection
dreamweaver
Includes also a setSelection
method. See also [sell][2] to work with selection within <input>
and <textarea>
elements.
install
npm install seleccion
seleccion.getSelection
Provides a polyfill for window.getSelection
.
var getSelection = get;
- Defaults to
window.getSelection
if available - Falls back to
document.selection
- Falls back to a naïve null object if both are unavailable
seleccion.set(range)
Provides a convenient cross-browser method to set the text selection into range
.
var setSelection = set;;
license
MIT