public com.gargoylesoftware.htmlunit.javascript.host.Range jsxFunction_getRangeAt(final int index) {
final List<Range> ranges = getRanges();
if (index < 0 || index >= ranges.size()) {
throw Context.reportRuntimeError("Invalid range index: " + index);
}
final Range range = ranges.get(index);
final com.gargoylesoftware.htmlunit.javascript.host.Range jsRange =
new com.gargoylesoftware.htmlunit.javascript.host.Range(range);
jsRange.setParentScope(getWindow());
jsRange.setPrototype(getPrototype(com.gargoylesoftware.htmlunit.javascript.host.Range.class));