API Reference
@univerjs
@univerjs/facade
classes
Fhooks

@univerjs/facade v0.2.14Docs


Class: FHooks

Constructors

new FHooks()

new FHooks(_injector, _lifecycleService): FHooks

Parameters

ParameterType
_injectorInjector
_lifecycleServiceLifecycleService

Returns

FHooks

Defined in

submodules/univer/packages/facade/src/apis/f-hooks.ts:24 (opens in a new tab)

Properties

PropertyModifierTypeDescriptionDefined in
_injectorreadonlyInjector-submodules/univer/packages/facade/src/apis/f-hooks.ts:25 (opens in a new tab)
onBeforeCopypublic(...args: [() => void]) => IDisposableThe onBeforeCopy event is fired before a copy operation is performed.submodules/univer/packages/facade/src/apis/f-hooks.ts:100 (opens in a new tab)
onBeforePastepublic(...args: [() => void]) => IDisposableThe onBeforePaste event is fired before a paste operation is performed.submodules/univer/packages/facade/src/apis/f-hooks.ts:114 (opens in a new tab)
onBeforeRedopublic(...args: [(action) => void]) => IDisposableHook that fires before a redo operation is executed.submodules/univer/packages/facade/src/apis/f-hooks.ts:86 (opens in a new tab)
onBeforeUndopublic(...args: [(action) => void]) => IDisposableHook that fires before an undo operation is executed.submodules/univer/packages/facade/src/apis/f-hooks.ts:72 (opens in a new tab)
onCopypublic(...args: [() => void]) => IDisposableThe onCopy event is fired after a copy operation is performed.submodules/univer/packages/facade/src/apis/f-hooks.ts:107 (opens in a new tab)
onPastepublic(...args: [() => void]) => IDisposableThe onPaste event is fired after a paste operation is performed.submodules/univer/packages/facade/src/apis/f-hooks.ts:121 (opens in a new tab)
onRedopublic(...args: [(action) => void]) => IDisposableHook that fires after a redo operation is executed.submodules/univer/packages/facade/src/apis/f-hooks.ts:93 (opens in a new tab)
onUndopublic(...args: [(action) => void]) => IDisposableHook that fires after an undo operation is executed.submodules/univer/packages/facade/src/apis/f-hooks.ts:79 (opens in a new tab)

Methods

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

submodules/univer/packages/facade/src/apis/f-hooks.ts:45 (opens in a new tab)


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

submodules/univer/packages/facade/src/apis/f-hooks.ts:54 (opens in a new tab)


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

submodules/univer/packages/facade/src/apis/f-hooks.ts:36 (opens in a new tab)


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

submodules/univer/packages/facade/src/apis/f-hooks.ts:63 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.