diff --git a/doc/api/inspector.md b/doc/api/inspector.md index 05c3b08917b0d9..c1c391eb14889a 100644 --- a/doc/api/inspector.md +++ b/doc/api/inspector.md @@ -488,17 +488,17 @@ Blocks until a client (existing or connected later) has sent An exception will be thrown if there is no active inspector. -## Node.js-specific protocol events +## Integration with DevTools -Node.js extends the Chrome DevTools protocol with Node.js-specific protocol events. DevTools -frontends connected to a running Node.js instance can capture these events and display them -accordingly to facilitate debugging. -The following methods broadcast a Node.js-specific protocol event to all connected frontends. +The `node:inspector` module provides an API for integrating with devtools that support Chrome DevTools Protocol. +DevTools frontends connected to a running Node.js instance can capture protocol events emitted from the instance +and display them accordingly to facilitate debugging. +The following methods broadcast a protocol event to all connected frontends. The `params` passed to the methods can be optional, depending on the protocol. ```js -// The `NodeNetwork.requestWillBeSent` event will be fired. -inspector.NodeNetwork.requestWillBeSent({ +// The `Network.requestWillBeSent` event will be fired. +inspector.Network.requestWillBeSent({ requestId: 'request-id-1', timestamp: Date.now() / 1000, wallTime: Date.now(), @@ -509,7 +509,7 @@ inspector.NodeNetwork.requestWillBeSent({ }); ``` -### `inspector.NodeNetwork.requestWillBeSent([params])` +### `inspector.Network.requestWillBeSent([params])`