← Back to PWA domain

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 page Target.TargetID which can be used to attach to via Target.attachToTarget or similar APIs.

Domain: PWA experimental

Parameters

NameTypeDescription
manifestIdstring
url (optional)string

Returns

NameTypeDescription
targetIdTarget.TargetIDID of the tab target created as a result.

Example Request

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

Example Response

{
  "id": 1,
  "result": {
    "targetId": "TARGET_NEW_001"
  }
}

Usage in Node.js

const result = await send('PWA.launch', {"manifestId": "manifestId-value"});
console.log(result);
// {"targetId": "TARGET_NEW_001"}