Experimental
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The Selection.removeAllRanges()
method removes all ranges
from the selection, leaving the anchorNode
and
focusNode
properties equal to null
and
leaving nothing selected.
Syntax
sel.removeAllRanges();
Parameters
None.
Specifications
Specification | Status | Comment |
---|---|---|
Selection API The definition of 'Selection.removeAllRanges()' in that specification. |
Working Draft | Current |
Browser compatibility
BCD tables only load in the browser
See also
Selection
, the interface it belongs to.