Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit 2de2125

Browse files
author
Valentin Kunz
committed
Add optional protocols parameter to WebSocket constructor.
Signed-off-by: Valentin Kunz <[email protected]>
1 parent aeae73c commit 2de2125

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery.websocket.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
(function($){
1212
$.extend({
13-
websocket: function(url, s) {
14-
var ws = window['MozWebSocket'] ? new MozWebSocket(url) : window['WebSocket'] ? new WebSocket(url) : {
13+
websocket: function(url, s, protocols) {
14+
var ws = window['MozWebSocket'] ? new MozWebSocket(url, protocols) : window['WebSocket'] ? new WebSocket(url, protocols) : {
1515
send: function(m){ return false; },
1616
close: function(){}
1717
};

0 commit comments

Comments
 (0)