(object: Cdp.Runtime.RemoteObject)
| 1302 | } |
| 1303 | |
| 1304 | async _copyObjectToClipboard(object: Cdp.Runtime.RemoteObject) { |
| 1305 | if (!object.objectId) { |
| 1306 | this._dap.with(dap => |
| 1307 | dap.copyRequested({ text: objectPreview.previewRemoteObject(object, 'copy') }), |
| 1308 | ); |
| 1309 | return; |
| 1310 | } |
| 1311 | |
| 1312 | try { |
| 1313 | const result = await serializeForClipboard({ |
| 1314 | cdp: this.cdp(), |
| 1315 | objectId: object.objectId, |
| 1316 | args: [2], |
| 1317 | silent: true, |
| 1318 | returnByValue: true, |
| 1319 | }); |
| 1320 | |
| 1321 | this._dap.with(dap => dap.copyRequested({ text: result.value })); |
| 1322 | } catch (e) { |
| 1323 | // ignored |
| 1324 | } finally { |
| 1325 | this.cdp() |
| 1326 | .Runtime.releaseObject({ objectId: object.objectId }) |
| 1327 | .catch(() => undefined); |
| 1328 | } |
| 1329 | } |
| 1330 | |
| 1331 | async _queryObjects(prototype: Cdp.Runtime.RemoteObject) { |
| 1332 | const slot = this._claimOutputSlot(); |
no test coverage detected