← Back to Target domain

Target.closeTarget

Closes the target. If the target is a page that gets closed too.

Domain: Target stable

Parameters

NameTypeDescription
targetIdTargetID

Returns

NameTypeDescription
successbooleanAlways set to true. If an error occurs, the response indicates protocol error.

Example Request

{
  "id": 1,
  "method": "Target.closeTarget",
  "params": {
    "targetId": "TARGET_ID_HERE"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "success": true
  }
}

Usage in Node.js

const result = await send('Target.closeTarget', {"targetId": "TARGET_ID_HERE"});
console.log(result);
// {"success": true}