exposeDevToolsProtocol

Inject object to the target's main frame that provides a communication channel with browser target.

Injected object will be available as window[bindingName].

The object has the following API:

  • binding.send(json) - a method to send messages over the remote debugging protocol

  • binding.onmessage = json => handleMessage(json) - a callback that will be called for the protocol notifications and command responses.

Official doc

Note: this function uses an input class, and constructing this class manually may lead to incompatibilities if the class's constructor arguments change in the future. For maximum compatibility, it is advised to use the overload of this function that directly takes the mandatory parameters as arguments, and the optional ones from a configuration lambda.


Inject object to the target's main frame that provides a communication channel with browser target.

Injected object will be available as window[bindingName].

The object has the following API:

  • binding.send(json) - a method to send messages over the remote debugging protocol

  • binding.onmessage = json => handleMessage(json) - a callback that will be called for the protocol notifications and command responses.

Official doc

Parameters

targetId

(undocumented in the protocol definition)