Core
API v2.x
2

addListener #

Allows you to listen specific events from the Chrome Devtool Protocol. You'll receive a notification when an event is emitted.


This only works using a Websocket connection since notification can only be sent on a persistent connection.

Query Syntax #

Websocket protocol #

Copied to clipboard!
{
  "controller": "debug",
  "action": "addListener",
  "body": {
    "event": "<event name>"
  }
}
  • event: event name to listen to.

::info If you want to listen to every event emitted you can listen to the event *. :::

Response #

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "controller": "debug",
  "action": "addListener",
  "requestId": "<unique request identifier>",
}

Notifications #

See Debugger Notifications.