Skip to content

WorkspaceLeaf.on('pinned-change') method

WorkspaceLeaf › on(‘pinned-change’)

Official

Handle the pinned-change event.

Signature:

on(name: "pinned-change", callback: (pinned: boolean) => unknown, ctx?: unknown): EventRef

Parameters:

Parameter Type Description
name "pinned-change" Should be 'pinned-change'.
callback (pinned: boolean) => unknown The callback function.
ctx? unknown The context passed as this to the callback function.

Returns: EventRefThe event reference.

Example:

leaf.on('pinned-change', (pinned) => {
console.log(pinned);
});