← Back to PWA domain

PWA.getOsAppState

Returns the following OS state for the given manifest id.

Domain: PWA experimental

Parameters

NameTypeDescription
manifestIdstringThe 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.

Returns

NameTypeDescription
badgeCountinteger
fileHandlersarray

Example Request

{
  "id": 1,
  "method": "PWA.getOsAppState",
  "params": {
    "manifestId": "manifestId-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "badgeCount": 1,
    "fileHandlers": []
  }
}

Usage in Node.js

const result = await send('PWA.getOsAppState', {"manifestId": "manifestId-value"});
console.log(result);
// {"badgeCount": 1, "fileHandlers": []}