[flashproxy/js] Safari requires "new" on the WebSocket constructor.

5 Apr
2012
5 Apr
'12
4:56 a.m.
commit 9396261d8f6d2b9543aef8f490856f15daa458e8 Author: David Fifield <david@bamsoftware.com> Date: Mon Apr 2 13:57:21 2012 -0700 Safari requires "new" on the WebSocket constructor. --- flashproxy.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/flashproxy.js b/flashproxy.js index 167ec2c..9a0b4fa 100644 --- a/flashproxy.js +++ b/flashproxy.js @@ -226,7 +226,7 @@ function make_websocket(addr) url = "ws://" + encodeURIComponent(addr.host) + ":" + encodeURIComponent(addr.port) + "/"; - return (window.WebSocket || window.MozWebSocket)(url, "base64"); + return new (window.WebSocket || window.MozWebSocket)(url, "base64"); } function FlashProxy()
4811
Age (days ago)
4811
Last active (days ago)
0 comments
1 participants
participants (1)
-
dcf@torproject.org