Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static Activate (...args) {
return CDP.Activate(...args)
}
static Activate (...args) {
return CDP.Activate(...args)
}
async () => {
const handler = await prepareTab(connectionOptions, `http://localhost:${rootOptions.server.port}${route}`, this._rendererOptions)
handlers.push(handler)
const {client, tab} = handler
const {Runtime} = client
await CRI.Activate(Object.assign({}, connectionOptions, {id: tab.id}))
const {result} = await Runtime.evaluate({
expression: `(${getPageContents})(${JSON.stringify(this._rendererOptions)}, '${route}')`,
awaitPromise: true
})
const parsedResult = JSON.parse(result.value)
await client.close()
return Promise.resolve(parsedResult)
}
)
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return prepareTab(connectionOptions, `http://localhost:${rootOptions.server.port}${route}`, _this3._rendererOptions);
case 2:
handler = _context6.sent;
handlers.push(handler);
client = handler.client, tab = handler.tab;
Runtime = client.Runtime;
_context6.next = 8;
return CRI.Activate(Object.assign({}, connectionOptions, { id: tab.id }));
case 8:
_context6.next = 10;
return Runtime.evaluate({
expression: `(${getPageContents})(${JSON.stringify(_this3._rendererOptions)}, '${route}')`,
awaitPromise: true
});
case 10:
_ref8 = _context6.sent;
result = _ref8.result;
parsedResult = JSON.parse(result.value);
_context6.next = 15;
return client.close();
case 15: