@univerjscoreclassesFhooks

@univerjs/core v0.5.4


Class: FHooks

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:28

FBase is a base class for all facade classes. It provides a way to extend classes with static and instance methods. The _initialize as a special method that will be called after the constructor. You should never call it directly.

Extends

Extended by

Constructors

new FHooks()

new FHooks(_injector, _lifecycleService): FHooks

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:29

Parameters

ParameterType
_injectorInjector
_lifecycleServiceLifecycleService

Returns

FHooks

Overrides

FBase.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseFBase._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
_injectorreadonlyInjectorundefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:30

Methods

dispose()

dispose(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

FBase.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

FBase.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

FBase.ensureNotDisposed


onBeforeRedo()

onBeforeRedo(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:115

Hook that fires before a redo operation is executed.

Parameters

ParameterTypeDescription
callback(action) => voidFunction to be called when the event is triggered

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onBeforeUndo()

onBeforeUndo(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:77

Hook that fires before an undo operation is executed.

Parameters

ParameterTypeDescription
callback(action) => voidFunction to be called when the event is triggered

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onReady()

onReady(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:50

The onReady event is fired when lifecycle stage is Ready.

Parameters

ParameterTypeDescription
callback() => voidCallback function that will be called when the event is fired

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onRedo()

onRedo(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:134

Hook that fires after a redo operation is executed.

Parameters

ParameterTypeDescription
callback(action) => voidFunction to be called when the event is triggered

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onRendered()

onRendered(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:59

The onRendered event is fired when lifecycle stage is Rendered.

Parameters

ParameterTypeDescription
callback() => voidCallback function that will be called when the event is fired

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onStarting()

onStarting(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:41

The onStarting event is fired when lifecycle stage is Starting.

Parameters

ParameterTypeDescription
callback() => voidCallback function that will be called when the event is fired

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onSteady()

onSteady(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:68

The onSteady event is fired when lifecycle stage is Steady.

Parameters

ParameterTypeDescription
callback() => voidCallback function that will be called when the event is fired

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


onUndo()

onUndo(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:96

Hook that fires after an undo operation is executed.

Parameters

ParameterTypeDescription
callback(action) => voidFunction to be called when the event is triggered

Returns

IDisposable

A disposable object that can be used to unsubscribe from the event


extend()

static extend(source): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-base.ts:26

Parameters

ParameterType
sourceany

Returns

void

Inherited from

FBase.extend