We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5623c76 commit 3dfd745Copy full SHA for 3dfd745
lib/devtools.js
@@ -51,11 +51,9 @@ function Protocol(options, callback) {
51
// fetch remotely via CDP when using stdio pipes (Bright Data exclusive)
52
if (options.cdp)
53
{
54
- return options.cdp.send('Browser.getProtocolJson', (err, data)=>{
55
- if (err)
56
- return callback(err);
57
- callback(null, JSON.parse(data.result));
58
- });
+ return options.cdp.send('Browser.getProtocolJson')
+ .then(data=>callback(null, JSON.parse(data.result)))
+ .catch(callback)
59
}
60
// if the local protocol is requested
61
if (options.local) {
0 commit comments