Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-remote-interface

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-remote-interface - npm Package Compare versions

Comparing version 0.17.1 to 0.18.0

8

lib/chrome.js

@@ -17,2 +17,5 @@ 'use strict';

// options
const defaultChooseTab = function (tabs) {
return tabs.findIndex((tab) => !!tab.webSocketDebuggerUrl);
};
options = options || {};

@@ -23,3 +26,3 @@ this.host = options.host || defaults.HOST;

this.remote = !!(options.remote);
this.tab = options.tab || options.chooseTab || function () { return 0; };
this.tab = options.tab || options.chooseTab || defaultChooseTab;
// locals

@@ -187,4 +190,3 @@ EventEmitter.call(this);

try {
// disable the permessage-deflate as a temporary fix for #39
chrome._ws = new WebSocket(url, {'perMessageDeflate': false});
chrome._ws = new WebSocket(url);
} catch (err) {

@@ -191,0 +193,0 @@ // handles bad URLs

@@ -12,3 +12,3 @@ {

"homepage": "https://github.com/cyrus-and/chrome-remote-interface",
"version": "0.17.1",
"version": "0.18.0",
"repository": {

@@ -25,3 +25,3 @@ "type": "git",

"dependencies": {
"ws": "1.1.x",
"ws": "2.0.x",
"commander": "2.1.x"

@@ -28,0 +28,0 @@ },

@@ -38,13 +38,16 @@ chrome-remote-interface [![Build Status](https://travis-ci.org/cyrus-and/chrome-remote-interface.svg?branch=master)](https://travis-ci.org/cyrus-and/chrome-remote-interface)

}).catch((err) => {
console.error(`ERROR: ${err.message}`);
console.error(err);
client.close();
});
}).on('error', (err) => {
console.error('Cannot connect to remote endpoint:', err);
// cannot connect to the remote endpoint
console.error(err);
});
```
Find more examples in the [wiki].
Find more examples in the [wiki], in particular notice how the above can be
rewritten using the [`async`/`await`][async-await-example] primitives.
[wiki]: https://github.com/cyrus-and/chrome-remote-interface/wiki
[async-await-example]: https://github.com/cyrus-and/chrome-remote-interface/wiki/Async-await-example

@@ -108,2 +111,14 @@ Installation

##### Headless
Since version 57, additionally use the `--headless` option, for example:
google-chrome --headless --remote-debugging-port=9222
Please note that currently the *DevTools* methods are not properly supported in
headless mode; use the [Target domain] instead. See [#84] for more information.
[#84]: https://github.com/cyrus-and/chrome-remote-interface/issues/84
[Target domain]: https://chromedevtools.github.io/debugger-protocol-viewer/tot/Target/
#### Android

@@ -431,4 +446,5 @@

Defaults to a function which returns the currently active tab (`function
(tabs) { return 0; }`);
Defaults to a function which returns the first available tab starting from the
currently active one (note that at most one connection can be established to
the same tab);
- `protocol`: [Chrome Debugging Protocol] descriptor object. Defaults to use the

@@ -435,0 +451,0 @@ protocol chosen according to the `remote` option;

Sorry, the diff of this file is too big to display

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