[]
        
(Showing Draft Content)

Viewer.CancellationToken

Class: CancellationToken

Viewer.CancellationToken

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new CancellationToken()

Properties

isCancellationRequested

Readonly isCancellationRequested: boolean

Gets true if cancellation is being requested.

Defined in

node_modules/@grapecity/ar-js-viewer/dist/ar-js-viewer.d.ts:785


parentToken

Optional Readonly parentToken: CancellationToken

The parent token

Defined in

node_modules/@grapecity/ar-js-viewer/dist/ar-js-viewer.d.ts:773


promise

Readonly promise: Promise<any>

Gets a promise that is triggered when cancellation is requested.

Defined in

node_modules/@grapecity/ar-js-viewer/dist/ar-js-viewer.d.ts:789

Methods

register

register(callback): void

Registers a new cancellation handler. Handler is invoked when cancellation is requested.

Parameters

Name Type
callback (reason: any) => any

Returns

void

Defined in

node_modules/@grapecity/ar-js-viewer/dist/ar-js-viewer.d.ts:794


create

Static create(parentToken?): Object

Creates a cancellation token and trigger function.

Parameters

Name Type Description
parentToken? CancellationToken The parent token.

Returns

Object

Name Type
token CancellationToken
cancel (e: any) => void

Defined in

node_modules/@grapecity/ar-js-viewer/dist/ar-js-viewer.d.ts:778