@univerjscoreclassesFhooks

@univerjs/core v0.5.0-beta.1Docs


Class: FHooks

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

Constructors

new FHooks()

new FHooks(_injector, _lifecycleService): FHooks

Parameters

ParameterType
_injectorInjector
_lifecycleServiceLifecycleService

Returns

FHooks

Overrides

FBase.constructor

Defined in

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

Properties

PropertyModifierTypeDefined in
_injectorreadonlyInjectorpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/facade/f-hooks.ts:30

Methods

_initialize()

_initialize(): void

Returns

void

Inherited from

FBase._initialize

Defined in

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


onBeforeRedo()

onBeforeRedo(callback): IDisposable

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

Defined in

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


onBeforeUndo()

onBeforeUndo(callback): IDisposable

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

Defined in

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


onReady()

onReady(callback): IDisposable

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

Defined in

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


onRedo()

onRedo(callback): IDisposable

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

Defined in

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


onRendered()

onRendered(callback): IDisposable

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

Defined in

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


onStarting()

onStarting(callback): IDisposable

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

Defined in

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


onSteady()

onSteady(callback): IDisposable

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

Defined in

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


onUndo()

onUndo(callback): IDisposable

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

Defined in

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


extend()

static extend(source): void

Parameters

ParameterType
sourceany

Returns

void

Inherited from

FBase.extend

Defined in

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