← Back to Target domain
Target.getTargets
Retrieves a list of available targets.
Domain: Target
stable
Parameters
| Name | Type | Description |
filter (optional) | TargetFilter | Only targets matching filter will be reported. If filter is not specified
and target discovery is currently enabled, a filter used for target discovery
is used for consistency. |
Returns
| Name | Type | Description |
targetInfos | array | The list of targets. |
Example Request
{
"id": 1,
"method": "Target.getTargets"
}
Example Response
{
"id": 1,
"result": {
"targetInfos": []
}
}
Usage in Node.js
const result = await send('Target.getTargets');
console.log(result);
// {"targetInfos": []}