A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/Selection/getRangeAt below:

getRangeAt ยท WebPlatform Docs

getRangeAt Summary

Returns a specified Range from a selection. The Range is specified by an index and cannot be greater than the number that is returned by rangeCount.

Method of dom/Selectiondom/Selection

Syntax
var range = selObj.getRangeAt();
Parameters index
Data-type
Number

The zero-based index of the range to return. A negative number or a number greater than or equal to rangeCount will result in an error.

Return Value

Returns an object of type RangeRange

The range object that will be returned.

Examples
var ranges = [];

var selObj = window.getSelection();

for(var i = 0; i < selObj.rangeCount; i++) {
 ranges[i] = selObj.getRangeAt(i);
}

Notes Remarks

Currently only Gecko supports multiple or disjointed selections.

Syntax Standards information Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4