Skip to content

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): EventRef

Parameters:

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: EventRefThe event reference.