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:

ParameterTypeDescription
name"history-change"Should be 'history-change'.
callback() => voidThe callback function.
ctx?unknownThe context passed as this to the callback function.

Returns: EventRefThe event reference.