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 #
{
"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 #
{
"status": 200,
"error": null,
"controller": "debug",
"action": "addListener",
"requestId": "<unique request identifier>",
}
Notifications #
Edit this page on Github (opens new window)