Creates a TextRange object collection from the current selection.
Syntaxvar retval = selection.createRangeCollection();
This method has no parameters.
Returns a collection of TextRange objects.
There are no standards that apply here.
Host applications can provide a multiple selection mechanism and can return a collection of TextRange objects that represents discontinuous selections.
The following example displays the text of the first selected item.
var myCollection; myCollection = document.selection.createRangeCollection(); console.log( myCollection.item(0).text );