chrome-remote-interface
Advanced tools
Comparing version 0.21.1 to 0.22.0
@@ -158,3 +158,3 @@ #!/usr/bin/env node | ||
// exit on disconnection | ||
this.on('disconnect', function () { | ||
client.on('disconnect', function () { | ||
console.error('Disconnected.'); | ||
@@ -161,0 +161,0 @@ saveHistory(); |
@@ -227,6 +227,3 @@ 'use strict'; | ||
chrome._ws.on('close', function (code) { | ||
// normal close no error | ||
if (code === 1000) { | ||
chrome._notifier.emit('disconnect'); | ||
} | ||
chrome.emit('disconnect'); | ||
}); | ||
@@ -233,0 +230,0 @@ chrome._ws.on('error', function (err) { |
@@ -12,3 +12,3 @@ { | ||
"homepage": "https://github.com/cyrus-and/chrome-remote-interface", | ||
"version": "0.21.1", | ||
"version": "0.22.0", | ||
"repository": { | ||
@@ -15,0 +15,0 @@ "type": "git", |
@@ -468,3 +468,3 @@ 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) | ||
returned which becomes fulfilled if the `connect` event is triggered and | ||
rejected if any of the `disconnect` or `error` events are triggered. | ||
rejected if the `error` event is triggered. | ||
@@ -483,13 +483,2 @@ The `EventEmitter` supports the following events: | ||
#### Event: 'disconnect' | ||
```javascript | ||
function () {} | ||
``` | ||
Emitted when an instance closes the WebSocket connection. | ||
This may happen for example when the user opens DevTools for the currently | ||
inspected Chrome target. | ||
#### Event: 'error' | ||
@@ -770,2 +759,14 @@ | ||
#### Event: 'disconnect' | ||
```javascript | ||
function () {} | ||
``` | ||
Emitted when the instance closes the WebSocket connection. | ||
This may happen for example when the user opens DevTools or when the tab is | ||
closed. | ||
#### client.send(method, [params], [callback]) | ||
@@ -772,0 +773,0 @@ |
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
854
950228
15094