getRangeAt method
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 IHTMLSelection::rangeCount.
Syntax
HRESULT retVal = object.getRangeAt(index, ppRange);
Parameters
index [in]
Type: longAn long that specifies the zero-based index of the Range to retrieve.
ppRange [out, retval]
Type: IHTMLDOMRangeThe address of a pointer to a variable that receives an IHTMLDOMRange interface.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 7.6.1
Remarks
Currently, Windows Internet Explorer 9 does not support multiple or disjointed selections in standards mode. A selection always has one Range only. Raises an IndexSizeError DOMException if the value of index is out of range. Versions earlier than Internet Explorer 10 will throw the exception as INDEX_SIZE_ERR.