Skip to content

Latest commit

 

History

History

close-tab

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

closeTab(tab)

Closes a tab

Example

import { openBrowser, openTab } from 'puppet-strings'

async function run() {
  const browser = await openBrowser('google-chrome')
  const tab = await openTab(browser, 'http://example.com')
  await closeTab(tab)
}

run()

Parameters

Returns

  • promise (Promise)

Details

After a tab is closed, the corresponding Tab object will no longer be valid. Subsequent actions on that tab will cause exceptions.