Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not pass protocols or options to browser WebSocket constructor
Fixes #309
- Loading branch information
1 parent
234b3c1
commit 94a1bec
Showing
4 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
module.exports = global.WebSocket || global.MozWebSocket; | ||
'use strict'; | ||
|
||
var Driver = global.WebSocket || global.MozWebSocket; | ||
if (Driver) { | ||
module.exports = function WebSocketBrowserDriver(url) { | ||
return new Driver(url); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,5 @@ sockjs.install({ | |
|
||
console.log(' [*] Listening on', port); | ||
server.listen(port); | ||
|
||
module.exports = server; |