Skip to content

Range

Values

asAbstractRange

let asAbstractRange: WebAPI.DOMAPI.range => WebAPI.DOMAPI.abstractRange

cloneContents

let cloneContents: WebAPI.DOMAPI.range => WebAPI.DOMAPI.documentFragment

cloneRange

let cloneRange: WebAPI.DOMAPI.range => WebAPI.DOMAPI.range

Parameters

WebAPI.DOMAPI.range

Return type

WebAPI.DOMAPI.range

collapse

let collapse: (WebAPI.DOMAPI.range, ~toStart: bool=?) => unit

Parameters

WebAPI.DOMAPI.range option< bool >

Return type

unit

compareBoundaryPoints

let compareBoundaryPoints: (
WebAPI.DOMAPI.range,
~how: int,
~sourceRange: WebAPI.DOMAPI.range,
) => int

Parameters

WebAPI.DOMAPI.range int WebAPI.DOMAPI.range

Return type

int

comparePoint

Returns −1 if the point is before the range, 0 if the point is in the range, and 1 if the point is after the range. Read more on MDN

let comparePoint: (
WebAPI.DOMAPI.range,
~node: WebAPI.DOMAPI.node,
~offset: int,
) => int

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node int

Return type

int

createContextualFragment

let createContextualFragment: (
WebAPI.DOMAPI.range,
string,
) => WebAPI.DOMAPI.documentFragment

Parameters

WebAPI.DOMAPI.range string

Return type

WebAPI.DOMAPI.documentFragment

deleteContents

let deleteContents: WebAPI.DOMAPI.range => unit

Parameters

WebAPI.DOMAPI.range

Return type

unit

detach

let detach: WebAPI.DOMAPI.range => unit

Parameters

WebAPI.DOMAPI.range

Return type

unit

extractContents

let extractContents: WebAPI.DOMAPI.range => WebAPI.DOMAPI.documentFragment

getBoundingClientRect

let getBoundingClientRect: WebAPI.DOMAPI.range => WebAPI.DOMAPI.domRect

getClientRects

let getClientRects: WebAPI.DOMAPI.range => WebAPI.DOMAPI.domRectList

insertNode

let insertNode: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

intersectsNode

Returns whether range intersects node. Read more on MDN

let intersectsNode: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => bool

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

bool

isPointInRange

let isPointInRange: (
WebAPI.DOMAPI.range,
~node: WebAPI.DOMAPI.node,
~offset: int,
) => bool

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node int

Return type

bool

make

let make: unit => WebAPI.DOMAPI.range

Parameters

unit

Return type

WebAPI.DOMAPI.range

selectNode

let selectNode: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

selectNodeContents

let selectNodeContents: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

setEnd

let setEnd: (
WebAPI.DOMAPI.range,
~node: WebAPI.DOMAPI.node,
~offset: int,
) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node int

Return type

unit

setEndAfter

let setEndAfter: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

setEndBefore

let setEndBefore: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

setStart

let setStart: (
WebAPI.DOMAPI.range,
~node: WebAPI.DOMAPI.node,
~offset: int,
) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node int

Return type

unit

setStartAfter

let setStartAfter: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

setStartBefore

let setStartBefore: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit

surroundContents

let surroundContents: (WebAPI.DOMAPI.range, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.range WebAPI.DOMAPI.node

Return type

unit