Skip to content

Selection

Values

addRange

let addRange: (WebAPI.DOMAPI.selection, WebAPI.DOMAPI.range) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.range

Return type

unit

collapse

let collapse: (
WebAPI.DOMAPI.selection,
~node: WebAPI.DOMAPI.node,
~offset: int=?,
) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.node option< int >

Return type

unit

collapseToEnd

let collapseToEnd: WebAPI.DOMAPI.selection => unit

Parameters

WebAPI.DOMAPI.selection

Return type

unit

collapseToStart

let collapseToStart: WebAPI.DOMAPI.selection => unit

Parameters

WebAPI.DOMAPI.selection

Return type

unit

containsNode

let containsNode: (
WebAPI.DOMAPI.selection,
~node: WebAPI.DOMAPI.node,
~allowPartialContainment: bool=?,
) => bool

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.node option< bool >

Return type

bool

deleteFromDocument

let deleteFromDocument: WebAPI.DOMAPI.selection => unit

Parameters

WebAPI.DOMAPI.selection

Return type

unit

empty

let empty: WebAPI.DOMAPI.selection => unit

Parameters

WebAPI.DOMAPI.selection

Return type

unit

extend

let extend: (
WebAPI.DOMAPI.selection,
~node: WebAPI.DOMAPI.node,
~offset: int=?,
) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.node option< int >

Return type

unit

getRangeAt

let getRangeAt: (WebAPI.DOMAPI.selection, int) => WebAPI.DOMAPI.range

Parameters

WebAPI.DOMAPI.selection int

Return type

WebAPI.DOMAPI.range

modify

let modify: (
WebAPI.DOMAPI.selection,
~alter: string=?,
~direction: string=?,
~granularity: string=?,
) => unit

Parameters

WebAPI.DOMAPI.selection option< string > option< string > option< string >

Return type

unit

removeAllRanges

let removeAllRanges: WebAPI.DOMAPI.selection => unit

Parameters

WebAPI.DOMAPI.selection

Return type

unit

removeRange

let removeRange: (WebAPI.DOMAPI.selection, WebAPI.DOMAPI.range) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.range

Return type

unit

selectAllChildren

let selectAllChildren: (WebAPI.DOMAPI.selection, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.node

Return type

unit

setBaseAndExtent

let setBaseAndExtent: (
WebAPI.DOMAPI.selection,
~anchorNode: WebAPI.DOMAPI.node,
~anchorOffset: int,
~focusNode: WebAPI.DOMAPI.node,
~focusOffset: int,
) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.node int WebAPI.DOMAPI.node int

Return type

unit

setPosition

let setPosition: (
WebAPI.DOMAPI.selection,
~node: WebAPI.DOMAPI.node,
~offset: int=?,
) => unit

Parameters

WebAPI.DOMAPI.selection WebAPI.DOMAPI.node option< int >

Return type

unit