Skip to content

Commit 6bc5757

Browse files
committed
ws options
1 parent 5922744 commit 6bc5757

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/chrome.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class Chrome extends EventEmitter {
6363
this._nextCommandId = 1;
6464
// properties
6565
this.webSocketUrl = undefined;
66+
this.webSocketProtocols = options.wsProtocols;
67+
this.webSocketOptions = options.wsOptions;
6668
// operations
6769
this._start();
6870
}
@@ -220,7 +222,9 @@ class Chrome extends EventEmitter {
220222
if (this.secure) {
221223
this.webSocketUrl = this.webSocketUrl.replace(/^ws:/i, 'wss:');
222224
}
223-
this._ws = new WebSocket(this.webSocketUrl);
225+
this._ws = new WebSocket(this.webSocketUrl,
226+
this.webSocketProtocols,
227+
this.webSocketOptions);
224228
} catch (err) {
225229
// handles bad URLs
226230
reject(err);

0 commit comments

Comments
 (0)