getWindowForTarget method

Future<GetWindowForTargetResult> getWindowForTarget({
  1. TargetID? targetId,
})

Get the browser window that contains the devtools target. targetId Devtools agent host id. If called as a part of the session, associated targetId is used.

Implementation

Future<GetWindowForTargetResult> getWindowForTarget(
    {target.TargetID? targetId}) async {
  var result = await _client.send('Browser.getWindowForTarget', {
    if (targetId != null) 'targetId': targetId,
  });
  return GetWindowForTargetResult.fromJson(result);
}