---
title: "AbstractRange | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface AbstractRange

The **`AbstractRange`** abstract interface is the base class upon which all DOM range types are defined. A range is an object that indicates the start and end points of a section of content within the document.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange)

interface AbstractRange {  
    [collapsed](#collapsed): boolean;  
    [endContainer](#endcontainer): [Node](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Node/);  
    [endOffset](#endoffset): number;  
    [startContainer](#startcontainer): [Node](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Node/);  
    [startOffset](#startoffset): number;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.AbstractRange))

-   AbstractRange
    -   [Range](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Range/)
    -   [StaticRange](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StaticRange/)

##### Index

### Properties[](#properties)

[collapsed](#collapsed) [endContainer](#endcontainer) [endOffset](#endoffset) [startContainer](#startcontainer) [startOffset](#startoffset)

## Properties[](#properties-1)

### `Readonly`collapsed[](#collapsed)

collapsed: boolean

The read-only **`collapsed`** property of the AbstractRange interface returns true if the range's start position and end position are the same.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange/collapsed)

### `Readonly`endContainer[](#endcontainer)

endContainer: [Node](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Node/)

The read-only **`endContainer`** property of the AbstractRange interface returns the Node in which the end of the range is located.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange/endContainer)

### `Readonly`endOffset[](#endoffset)

endOffset: number

The **`endOffset`** property of the AbstractRange interface returns the offset into the end node of the range's end position.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange/endOffset)

### `Readonly`startContainer[](#startcontainer)

startContainer: [Node](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Node/)

The read-only **`startContainer`** property of the AbstractRange interface returns the Node in which the start of the range is located.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange/startContainer)

### `Readonly`startOffset[](#startoffset)

startOffset: number

The read-only **`startOffset`** property of the AbstractRange interface returns the offset into the start node of the range's start position.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AbstractRange/startOffset)
