Skip to main content
Version: v1

IDebuggerController Interface

Signature

export interface IDebuggerController

Methods

Method Return Type Description
connectToUi(ui) any Initialization. UI layers calls into controller to connect the two.
onClose() void Called by UI layer when debugger window is closed by user If called before user makes selection of snapshot/file, original document service is returned to loader (instead of debugger service) and normal document load continues.
onDownloadOpsButtonClick(anonymize) Promise<string> "Download ops" option is clicked in the UI. Returns JSON of the full opStream when available.
onOpButtonClick(steps) void "next op" button is clicked in the UI
onSnapshotFileSelection(file) void UI Layer notifies about selection of version to continue. On successful load, versionSelected() is called.
onVersionSelection(version) void UI Layer notifies about selection of version to continue. On successful load, versionSelected() is called.

Method Details

connectToUi

Initialization. UI layers calls into controller to connect the two.

Signature

connectToUi(ui: IDebuggerUI): any;

Parameters

Parameter Type Description
ui IDebuggerUI UI layer

Returns

Return type: any

onClose

Called by UI layer when debugger window is closed by user If called before user makes selection of snapshot/file, original document service is returned to loader (instead of debugger service) and normal document load continues.

Signature

onClose(): void;

onDownloadOpsButtonClick

"Download ops" option is clicked in the UI. Returns JSON of the full opStream when available.

Signature

onDownloadOpsButtonClick(anonymize: boolean): Promise<string>;

Parameters

Parameter Type Description
anonymize boolean anonymize the ops json using the sanitization tool

Returns

Return type: Promise<string>

onOpButtonClick

"next op" button is clicked in the UI

Signature

onOpButtonClick(steps: number): void;

Parameters

Parameter Type Description
steps number number of ops to play.

onSnapshotFileSelection

UI Layer notifies about selection of version to continue. On successful load, versionSelected() is called.

Signature

onSnapshotFileSelection(file: File): void;

Parameters

Parameter Type Description
file File

onVersionSelection

UI Layer notifies about selection of version to continue. On successful load, versionSelected() is called.

Signature

onVersionSelection(version: IVersion): void;

Parameters

Parameter Type Description
version IVersion Snapshot version to start from.