Workspace.setActiveLeaf method
Workspace › setActiveLeaf
Official
Sets the active leaf.Signature:
setActiveLeaf(leaf: WorkspaceLeaf, params?: SetActiveLeafParams | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| leaf | WorkspaceLeaf | The new active leaf. |
| params? | SetActiveLeafParams | undefined | Parameter object of whether to set the focus. |
Returns: void
Since: 0.16.3
Example:
app.workspace.setActiveLeaf(app.workspace.getLeaf(false), { focus: true });Official
Sets the active leaf.Signature:
setActiveLeaf(leaf: WorkspaceLeaf, pushHistory: boolean, focus: boolean): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| leaf | WorkspaceLeaf | |
| pushHistory | boolean | |
| focus | boolean |
Returns: void