Skip to main content
Version: v1

IDebuggerController Interface

Signature​

export interface IDebuggerController

Methods​

MethodReturn TypeDescription
connectToUi(ui)anyInitialization. UI layers calls into controller to connect the two.
onClose()voidCalled 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)voidUI Layer notifies about selection of version to continue. On successful load, versionSelected() is called.
onVersionSelection(version)voidUI 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​

ParameterTypeDescription
uiIDebuggerUIUI 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​

ParameterTypeDescription
anonymizebooleananonymize 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​

ParameterTypeDescription
stepsnumbernumber 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​

ParameterTypeDescription
fileFile

onVersionSelection​

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

Signature​

onVersionSelection(version: IVersion): void;

Parameters​

ParameterTypeDescription
versionIVersionSnapshot version to start from.