Console Reference: c3CloseTabs
C3 AI Console uses a tabbed interface similar to other integrated development environments (IDEs) such as VS Code. Use the c3CloseTabs function to close one or more open tabs.
Parameters
| Name | Type | Description |
|---|---|---|
title | string | function | A tab name, or a function that takes a tab name and returns true when the name is the tab to be closed |
The title parameter is not required. When omitted, c3CloseTabs closes all tabs.
Examples
Close all open tabs:
JavaScript
c3CloseTabs();Close a specific tab by name:
JavaScript
c3CloseTabs("<tab_name>"); // Replace <tab_name> with the target tab nameClose all tabs containing a text pattern:
JavaScript
c3CloseTabs((tabName) => tabName.startsWith("Untitled-"));