← Back to Target domain
Target.getDevToolsTarget
Gets the targetId of the DevTools page target opened for the given target
(if any).
Domain: Target
experimental
Parameters
| Name | Type | Description |
targetId | TargetID | Page or tab target ID. |
Returns
| Name | Type | Description |
targetId | TargetID | The targetId of DevTools page target if exists. |
Example Request
{
"id": 1,
"method": "Target.getDevToolsTarget",
"params": {
"targetId": "TARGET_ID_HERE"
}
}
Example Response
{
"id": 1,
"result": {
"targetId": "TARGET_NEW_001"
}
}
Usage in Node.js
const result = await send('Target.getDevToolsTarget', {"targetId": "TARGET_ID_HERE"});
console.log(result);
// {"targetId": "TARGET_NEW_001"}