← Back to Page domain

Page.setWebLifecycleState

Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/

Domain: Page experimental

Parameters

NameTypeDescription
statestringTarget lifecycle state

Example Request

{
  "id": 1,
  "method": "Page.setWebLifecycleState",
  "params": {
    "state": "state-value"
  }
}

Example Response

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

Usage in Node.js

const result = await send('Page.setWebLifecycleState', {"state": "state-value"});
console.log(result);