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
| Parameter | Type | Description |
|---|---|---|
callback | LayerLifecycleHook | The callback to invoke with the layer being disposed. |
Returns
A function to unregister the hook.
() => void