WorkspaceLeaf.on('history-change') method
WorkspaceLeaf › on(‘history-change’)
Unofficial
Triggers when the leaf's history gets updated (e.g. when new file is opened, or moving through history).Signature:
on(name: "history-change", callback: () => void, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "history-change" | Should be 'history-change'. |
| callback | () => void | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.