exposeDevToolsProtocol method
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.
Implementation
@experimental
Future<WipResponse> exposeDevToolsProtocol(
String targetId, {
String? bindingName,
}) {
final Map<String, dynamic> params = {'targetId': targetId};
if (bindingName != null) {
params['bindingName'] = bindingName;
}
return sendCommand(
'Target.exposeDevToolsProtocol',
params: params,
);
}