close_tab
Close a specific browser tab by its ID, or the currently attached tab when no ID is provided. If the active tab is closed, the browser automatically reconnects to another available tab. Returns ok:false when no tabs remain to close.
Instructions
close_tab(123) — 关掉指定标签;tab 省略则关当前 attached tab。 走扩展 close_tab action(chrome.tabs.remove)。关掉活动标签后扩展会自动重连到 另一可用标签、经 attach 回调同步 active_tab_id。无标签可关 → ok:false。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No |