Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function getActiveTab (cdpPort: number, browserId: string): Promise {
const tabs = await remoteChrome.listTabs({ port: cdpPort });
return tabs.filter(t => t.type === 'page' && t.url.includes(browserId))[0];
}