Class selection

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(target: document): selection

Parameters

Returns

selection

constructor(target: element): selection

Parameters

Returns

selection

constructor(target: selection): selection

Parameters

Returns

selection

Properties

public document: document

public isFake: boolean

public isLocked: boolean

public rev: number

public root: element

Methods

public createBookmarks(serializable: Object): Array<any>

Parameters

  • serializable: Object

Returns

Array<any>

public createBookmarks2(normalized?: Object): Array<any>

Parameters

  • normalized?: Object optional

Returns

Array<any>

public fake(element: element)

Parameters

public getCommonAncestor(): element

Returns

element

public getNative(): Object

Returns

Object

public getRanges(onlyEditables?: boolean): Array<any>

Parameters

  • onlyEditables?: boolean optional

Returns

Array<any>

public getSelectedElement(): element

Returns

element

public getSelectedText(): string

Returns

string

public getStartElement(): element

Returns

element

public getType(): number

Returns

number

public isHidden(): boolean

Returns

boolean

public lock()

public removeAllRanges()

public reset()

public scrollIntoView()

public selectBookmarks(bookmarks: Array<any>): selection

Parameters

  • bookmarks: Array<any>

Returns

selection

public selectElement(element: element)

Parameters

public selectRanges(ranges: Array<any>)

Parameters

  • ranges: Array<any>

public unlock(restore: Object)

Parameters

  • restore: Object