PWA Domain
This domain allows interacting with the browser to control PWAs.
Methods
Types
Methods
PWA.getOsAppState #
Returns the following OS state for the given manifest id.
parameters
- manifestId
-
string
The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest.
Return Object
- badgeCount
-
integer
- fileHandlers
-
array[ FileHandler ]
PWA.install #
Installs the given manifest identity, optionally using the given install_url or IWA bundle location.
TODO(crbug.com/337872319) Support IWA to meet the following specific requirement. IWA-specific install description: If the manifest_id is isolated-app://, install_url_or_bundle_url is required, and can be either an http(s) URL or file:// URL pointing to a signed web bundle (.swbn). The .swbn file's signing key must correspond to manifest_id. If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist.
parameters
- manifestId
-
string
- installUrlOrBundleUrl
-
string
The location of the app or bundle overriding the one derived from the manifestId.
PWA.launch #
Launches the installed web app, or an url in the same web app instead of the default start url if it is provided. Returns a tab / web contents based Target.TargetID which can be used to attach to via Target.attachToTarget or similar APIs.
parameters
- manifestId
-
string
- url
-
string
Return Object
- targetId
-
Target.TargetID
ID of the tab target created as a result.
PWA.uninstall #
Uninstals the given manifest_id and closes any opened app windows.
parameters
- manifestId
-
string
Types
PWA.FileHandler #
Type: object
properties
- action
-
string
- accepts
-
array[ FileHandlerAccept ]
- displayName
-
string
PWA.FileHandlerAccept #
The following types are the replica of https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67
Type: object
properties
- mediaType
-
string
New name of the mimetype according to https://www.iana.org/assignments/media-types/media-types.xhtml
- fileExtensions
-
array[ string ]