Skip to content

textmode.js / plugins / TextmodePluginContext / registerLayerDisposedHook

Method: registerLayerDisposedHook()

ts
registerLayerDisposedHook(callback): () => void;

Register a callback to be invoked when a layer is about to be disposed.

Parameters

ParameterTypeDescription
callbackLayerLifecycleHookThe callback to invoke with the layer being disposed.

Returns

A function to unregister the hook.

() => void

Example