Version: 1.8.0

ChromiumBrowserContext

Chromium-specific features including background pages, service worker support, etc.

const backgroundPage = await context.waitForEvent('backgroundpage');

chromiumBrowserContext.on('backgroundpage')#

Emitted when new background page is created in the context.

note

Only works with persistent context.

chromiumBrowserContext.on('serviceworker')#

Emitted when new service worker is created in the context.

chromiumBrowserContext.backgroundPages()#

All existing background pages in the context.

chromiumBrowserContext.newCDPSession(page)#

Returns the newly created session.

chromiumBrowserContext.serviceWorkers()#

All existing service workers in the context.