Commit Graph

44 Commits

Author SHA1 Message Date
Damien Arrachequesne
d134feeaa6 feat: add missing ws options
Reference: https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketaddress-protocols-options

Related:

- https://github.com/socketio/engine.io-client/issues/574
- https://github.com/socketio/engine.io-client/issues/615
2021-01-14 01:19:25 +01:00
Damien Arrachequesne
5f47a50ee5 refactor: refactor the handling of the options 2020-02-11 23:33:34 +01:00
GK
f3d9f2bcfb remove util.js 2014-04-11 20:15:20 -04:00
GK
5d3ec15c95 remove on, load, replace keys and inherits with modules 2014-04-11 19:45:46 -04:00
GK
85a858bc68 merged with master 2014-03-30 17:26:46 -04:00
GK
3bbb714a13 querystring extracted from util.js into own npm module 2014-03-30 17:19:44 -04:00
Guillermo Rauch
b084823008 Merge pull request #266 from get/parsejson_new
ParseJSON and parseURI made into their own modules
2014-03-08 19:40:36 -02:00
Tony Kovanen
55f10e68b3 Removed the global dependency 2014-03-07 01:44:16 +02:00
GK
3011d31aa2 made parseJSON its own module, update calls 2014-02-22 18:51:09 -05:00
GK
de2c561e45 made parseUri its own node module, change parseUri calls and tests 2014-02-09 12:09:57 -08:00
Brian Malehorn
ebefd5e33a fix parseUri('localhost:80'), add ipv6 addresses 2014-02-09 11:06:33 -05:00
Guillermo Rauch
d20ad91dc2 util: remove unused hasCORS 2014-01-17 10:28:23 -08:00
Guillermo Rauch
41fa0c3993 remove deferring for faster startup (fixes #174) 2014-01-17 10:23:33 -08:00
Roman Shtylman
3a590c003b remove duplicate xmlhttprequest code
Since we shim the XMLHttpRequest module with our xmlhttprequest.js code
for browser packaging, we do not need the legacy util.request function
and can use the XMLHttpRequest module directly.
2014-01-15 14:18:13 -05:00
Guillermo Rauch
f64e22d1b1 use jsonp in favor of XDomainRequest to preserve Cookie headers in all situations [3rd-eden] (fixes #217) 2013-12-20 12:36:33 -03:00
Roman Shtylman
a969aa761a add browserify support
fixes #200
2013-11-01 21:24:46 -04:00
Tim
967cb09a6b Force timestampRequests for Chromeframe. 2013-08-27 15:33:29 +10:00
Nathan Rajlich
43414294dd use updated component/global API 2013-08-22 21:46:49 -07:00
Nathan Rajlich
a9846e549f util: add jsdoc comment 2013-08-22 17:15:56 -07:00
Nathan Rajlich
a19e3ab1af util: make the request() helper accept an "options" object 2013-08-22 17:15:02 -07:00
Nathan Rajlich
164f71085c use "component/has-cors" 2013-08-22 14:16:26 -07:00
Nathan Rajlich
732180a082 util: use "component/global" 2013-08-22 13:37:54 -07:00
Nathan Rajlich
5ee23e8e41 use "component/global" 2013-08-22 12:01:28 -07:00
Nathan Rajlich
d0f7549d07 util: more bullet-proof global() function
Somebody could easily add a fake global `window` variable in node, and things
would have been thrown off before. With this logic, the *real* "global" is
always returned.
2013-08-22 11:24:08 -07:00
3rd-Eden
3c6eb2a177 Don't check against the window to detect node.js, wrap code in a try catch statement
and have it degrade gracefully.

Fixes #147
2013-03-26 21:41:00 +01:00
Guillermo Rauch
f9f0c1227e util: implemented simple qsParse 2013-03-16 09:19:48 -07:00
Sérgio Ramos
5f8356a567 fix "TypeError: Object #<Object> has no method 'global'" 2013-01-21 14:26:49 +00:00
Raynos
eb4d91bde9 Do not shadow global XMLHttpRequest
If you use the XMLHttpRequest variable name then the if
typeof XMLHttpRequest === 'undefined' check will always
return false and the XHR polling method is never used.

This is needed because JSONP polling is buggy and doesn't emit
close when server shutsdown. JSONP should be fixed / disabled.
2013-01-06 17:03:52 -08:00
Sérgio Ramos
23315f46a9 use window to detect platform and fix global reference 2012-12-12 16:43:49 +00:00
Guillermo Rauch
adadcdfbe8 *: fix references to global (fixes #79) 2012-12-10 12:10:20 -03:00
Guillermo Rauch
50c05f9f50 util: remove if node 2012-12-08 18:42:59 -03:00
Raynos
5bfd8ee5a8 BROWSERIFY SUPPORT 2012-12-06 22:44:36 -08:00
Mikito Takada
30f28f62dd Prefer XMLHttpRequest over XDomainRequest if and only if XHR has withCredentials, which is the case for IE10 but not earlier IE versions. 2012-09-25 11:42:07 -07:00
Guillermo Rauch
272f136330 util: fixed parens 2012-09-21 10:59:47 -07:00
Guillermo Rauch
3d2baff19e polling: added cache-busting for iOS6 2012-09-21 10:57:29 -07:00
Guillermo Rauch
56f9a1e0d4 util: added android UA sniffing 2012-08-01 17:23:28 -07:00
Guillermo Rauch
865ad73ddd No longer needed with new browserbuild. 2012-01-18 08:48:16 -08:00
Guillermo Rauch
ed59483bb9 Added util#keys 2012-01-17 08:14:06 -08:00
Guillermo Rauch
b6daf3212e Fixed order of on and load in util. 2012-01-16 08:05:08 -08:00
Guillermo Rauch
2ef709b284 Added back load/defer utils from socket.io
Added JSON parse from jquery
2012-01-03 13:25:56 -08:00
Guillermo Rauch
f3306ea1a1 Added util#qs 2011-12-23 12:03:01 -08:00
Guillermo Rauch
7c28a36ef4 Fixed undefined util. 2011-12-15 10:11:23 -08:00
Guillermo Rauch
7489fa4378 Added parseUri to util, cleaned up. 2011-11-27 11:30:28 -08:00
Guillermo Rauch
21b75fa15e Initial import 2011-11-18 10:08:39 -08:00