# Tabs ## List `client.computers.tabs.list(stringid, RequestOptionsoptions?): ActionResult` **get** `/computers/{id}/tabs` Get a list of open tabs with IDs, URLs, titles, and main tab status (browser sessions only). Includes external CDP pages (e.g., Playwright). Excludes devtools:// and chrome:// tabs. Results may be eventually consistent for newly created tabs. ### Parameters - `id: string` ### Returns - `ActionResult` - `error_message?: string` - `executed_tab_id?: string` - `page_context?: V2GoBackendInternalTypesPageContext` - `device_scale_factor?: number` - `is_main_tab?: boolean` - `page_height?: number` - `page_width?: number` - `scroll_x?: number` - `scroll_y?: number` - `tab_id?: string` - `title?: string` - `url?: string` - `viewport_height?: number` - `viewport_width?: number` - `request_id?: string` - `result?: Record` - `status?: string` - `timestamp?: string` ### Example ```typescript import Lightcone from '@tzafon/lightcone'; const client = new Lightcone({ apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted }); const actionResult = await client.computers.tabs.list('id'); console.log(actionResult.executed_tab_id); ``` ## Create `client.computers.tabs.create(stringid, TabCreateParamsbody?, RequestOptionsoptions?): ActionResult` **post** `/computers/{id}/tabs` Create a new tab, optionally navigating to a URL. The new tab becomes the main tab (browser sessions only). ### Parameters - `id: string` - `body: TabCreateParams` - `url?: string` ### Returns - `ActionResult` - `error_message?: string` - `executed_tab_id?: string` - `page_context?: V2GoBackendInternalTypesPageContext` - `device_scale_factor?: number` - `is_main_tab?: boolean` - `page_height?: number` - `page_width?: number` - `scroll_x?: number` - `scroll_y?: number` - `tab_id?: string` - `title?: string` - `url?: string` - `viewport_height?: number` - `viewport_width?: number` - `request_id?: string` - `result?: Record` - `status?: string` - `timestamp?: string` ### Example ```typescript import Lightcone from '@tzafon/lightcone'; const client = new Lightcone({ apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted }); const actionResult = await client.computers.tabs.create('id'); console.log(actionResult.executed_tab_id); ``` ## Delete `client.computers.tabs.delete(stringtabID, TabDeleteParamsparams, RequestOptionsoptions?): ActionResult` **delete** `/computers/{id}/tabs/{tab_id}` Close a specific tab by ID. Cannot close the last remaining tab (browser sessions only). Tab IDs come from ListTabs. ### Parameters - `tabID: string` - `params: TabDeleteParams` - `id: string` Computer ID ### Returns - `ActionResult` - `error_message?: string` - `executed_tab_id?: string` - `page_context?: V2GoBackendInternalTypesPageContext` - `device_scale_factor?: number` - `is_main_tab?: boolean` - `page_height?: number` - `page_width?: number` - `scroll_x?: number` - `scroll_y?: number` - `tab_id?: string` - `title?: string` - `url?: string` - `viewport_height?: number` - `viewport_width?: number` - `request_id?: string` - `result?: Record` - `status?: string` - `timestamp?: string` ### Example ```typescript import Lightcone from '@tzafon/lightcone'; const client = new Lightcone({ apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted }); const actionResult = await client.computers.tabs.delete('tab_id', { id: 'id' }); console.log(actionResult.executed_tab_id); ``` ## Switch `client.computers.tabs.switch(stringtabID, TabSwitchParamsparams, RequestOptionsoptions?): ActionResult` **post** `/computers/{id}/tabs/{tab_id}/switch` Switch the main/active tab to a different tab by ID (browser sessions only). Tab IDs come from ListTabs. ### Parameters - `tabID: string` - `params: TabSwitchParams` - `id: string` Computer ID ### Returns - `ActionResult` - `error_message?: string` - `executed_tab_id?: string` - `page_context?: V2GoBackendInternalTypesPageContext` - `device_scale_factor?: number` - `is_main_tab?: boolean` - `page_height?: number` - `page_width?: number` - `scroll_x?: number` - `scroll_y?: number` - `tab_id?: string` - `title?: string` - `url?: string` - `viewport_height?: number` - `viewport_width?: number` - `request_id?: string` - `result?: Record` - `status?: string` - `timestamp?: string` ### Example ```typescript import Lightcone from '@tzafon/lightcone'; const client = new Lightcone({ apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted }); const actionResult = await client.computers.tabs.switch('tab_id', { id: 'id' }); console.log(actionResult.executed_tab_id); ```