Skip to content

Commit 7385f17

Browse files
authored
feat: expose remove tab (#123)
1 parent fc56548 commit 7385f17

File tree

1 file changed

+6
-0
lines changed
  • packages/electron-chrome-extensions/src/browser

1 file changed

+6
-0
lines changed

packages/electron-chrome-extensions/src/browser/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ export class ElectronChromeExtensions extends EventEmitter {
199199
this.ctx.store.addTab(tab, window)
200200
}
201201

202+
/** Remove webContents from being tracked as a tab. */
203+
removeTab(tab: Electron.WebContents) {
204+
this.checkWebContentsArgument(tab)
205+
this.ctx.store.removeTab(tab)
206+
}
207+
202208
/** Notify extension system that the active tab has changed. */
203209
selectTab(tab: Electron.WebContents) {
204210
this.checkWebContentsArgument(tab)

0 commit comments

Comments
 (0)