Socket
Socket
Sign inDemoInstall

chrome-remote-debugging-protocol

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-remote-debugging-protocol

API for interacting with chrome's remote debugger protocol


Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Chrome Remote Debugging Protocol

A simple client for connecting to chrome and speaking the chrome remote debug protocol

It borrows chrome's internal DevTools connection classes, which make it easy to use Domain methods and subscribe to events.

WebSocketConnection

The WebSocketConnection class is responsible for creating a connection with the browser. It is also responsible for maintaining a set of connected agents.

These agents are used to issue commands to the browser and dispatch events from the browser.

generateCommands

generateCommands is a helper function for creating the code that will be evaluated to dynamically build the agents.

Here's an example snippet:

InspectorBackend.registerEvent("Inspector.inspect", ["object", "hints"]);
InspectorBackend.registerEvent("Inspector.detached", ["reason"]);
InspectorBackend.registerCommand("Page.enable", [], [], false);
InspectorBackend.registerCommand("Debugger.getBacktrace", [], ["callFrames", "asyncStackTrace"], false);
Steps to upgrade api.js:
  • add line /* eslint-disable */
  • add line var WebInspector = {}, window = window || {};
  • copy front_end/common/Object.js
  • copy front_end/sdk/InspectorBackend.js
  • copy front_end/main/Connections.js
  • copy front_end/sdk/InspectorBackendHostedMode.js
  • delete WebInspector.InspectorBackendHostedMode.loadFromJSONIfNeeded("../protocol.json");
  • add the exports statement
module.exports = {
  InspectorBackendClass,
  WebSocketConnection: WebInspector.WebSocketConnection
};

FAQs

Package last updated on 23 Nov 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc