chrome-remote-interface
Advanced tools
Comparing version 0.23.3 to 0.24.0
@@ -13,2 +13,3 @@ #!/usr/bin/env node | ||
const CDP = require('../'); | ||
const packageInfo = require('../package'); | ||
@@ -148,2 +149,11 @@ function display(object) { | ||
// utility custom command | ||
cdpRepl.defineCommand('target', { | ||
help: 'Display the current target', | ||
action: function () { | ||
console.log(client.webSocketUrl); | ||
this.displayPrompt(); | ||
} | ||
}); | ||
// enable history | ||
@@ -257,2 +267,3 @@ loadHistory(); | ||
program | ||
.version(packageInfo.version) | ||
.option('-t, --host <host>', 'HTTP frontend host') | ||
@@ -259,0 +270,0 @@ .option('-p, --port <port>', 'HTTP frontend port') |
@@ -57,2 +57,4 @@ 'use strict'; | ||
this._nextCommandId = 1; | ||
// properties | ||
this.webSocketUrl = undefined; | ||
// operations | ||
@@ -237,2 +239,3 @@ start.call(this); | ||
} | ||
chrome.webSocketUrl = url; | ||
chrome._ws = new WebSocket(url); | ||
@@ -239,0 +242,0 @@ } catch (err) { |
@@ -12,3 +12,3 @@ { | ||
"homepage": "https://github.com/cyrus-and/chrome-remote-interface", | ||
"version": "0.23.3", | ||
"version": "0.24.0", | ||
"repository": { | ||
@@ -15,0 +15,0 @@ "type": "git", |
@@ -454,3 +454,5 @@ 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) | ||
These options are also valid properties of all the instances of the `CDP` class. | ||
These options are also valid properties of all the instances of the `CDP` | ||
class. In addition to that, the `webSocketUrl` field contains the currently used | ||
WebSocket URL. | ||
@@ -457,0 +459,0 @@ `callback` is a listener automatically added to the `connect` event of the |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
968837
15526
846