Skip to content

Connect using the Promise API

Andrea Cardaci edited this page Dec 4, 2016 · 1 revision

Omit the callback to use the Promise API for the connection.

const CDP = require('chrome-remote-interface');

CDP().then((client) => {
    console.log('Connected!');
    client.close();
}).catch((err) => {
    console.error(err);
});