Socket
Socket
Sign inDemoInstall

chrome-debugging

Package Overview
Dependencies
8
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chrome-debugging

Chrome DevTools Protocol


Version published
Maintainers
1
Install size
1.92 MB
Created

Readme

Source

chrome-debugging

Chrome DevTools Protocol.

npm i chrome-debugging

Cache built-in by target id, common helpers, and easy to use.

Usage

const ChromeDebugging = require('chrome-debugging')

const chrome = new ChromeDebugging({ port: 9230 })
const targets = await chrome.list({ ignoreProtocols: ['devtools'] })

for (const target of targets) {
  const tab = await chrome.use(target.id)

  // const { DOM, CSS, Page, Runtime } = tab
  console.log(await tab.$('*'))

  // await tab.close()
}

await chrome.destroy()

It uses chrome-remote-interface internally.
I.e. tab has several properties, methods, etc as the original "CDP client".

License

MIT

FAQs

Last updated on 24 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc