diff options
author | Fraser Adams <fraser.adams@blueyonder.co.uk> | 2013-10-30 18:04:05 +0000 |
---|---|---|
committer | Fraser Adams <fraser.adams@blueyonder.co.uk> | 2013-10-30 18:04:05 +0000 |
commit | 70c48271202c78763fdf818111376b2e214e8c41 (patch) | |
tree | 2ca3e43fc6820f4ae056018e2c9903dfb72301c3 | |
parent | e37d142969386b92616383cf8616e3ca2d92c3af (diff) |
replace window.WebSocket with window['WebSocket'] to avoid closure compiler issues
-rw-r--r-- | src/library_sockfs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library_sockfs.js b/src/library_sockfs.js index c79661d8..78fc382f 100644 --- a/src/library_sockfs.js +++ b/src/library_sockfs.js @@ -140,7 +140,7 @@ mergeInto(LibraryManager.library, { // the node ws library API is slightly different than the browser's var opts = ENVIRONMENT_IS_NODE ? {headers: {'websocket-protocol': ['binary']}} : ['binary']; // If node we use the ws library. - var WebSocket = ENVIRONMENT_IS_NODE ? require('ws') : window.WebSocket; + var WebSocket = ENVIRONMENT_IS_NODE ? require('ws') : window['WebSocket']; ws = new WebSocket(url, opts); ws.binaryType = 'arraybuffer'; } catch (e) { |