Closes a tab
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()
tab
(Tab)
promise
(Promise)
After a tab is closed, the corresponding Tab object will no longer be valid. Subsequent actions on that tab will cause exceptions.