Files
puppeteer/docs/api/puppeteer.browser.installpwa.md

1.1 KiB

sidebar_label
sidebar_label
Browser.installPWA

Browser.installPWA() method

Installs a Progressive Web App (PWA) and returns its manifest id.

Signature

class Browser {
  abstract installPWA(options: InstallPWAOptions): Promise<string>;
}

Parameters

Parameter

Type

Description

options

InstallPWAOptions

Returns:

Promise<string>

Remarks

Only available when connected to the browser over a pipe connection. Set pipe: true in puppeteer.launch; the launch option defaults to false. The underlying PWA CDP domain is not exposed over a WebSocket connection.

The returned manifest id echoes InstallPWAOptions.manifestId, so it can be passed directly to Browser.launchPWA(), Browser.getPWAState(), or Browser.uninstallPWA().