engine.io-client
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -34,2 +34,11 @@ /** | ||
/** | ||
* Until https://github.com/tc39/proposal-global is shipped. | ||
*/ | ||
function glob () { | ||
return typeof self !== 'undefined' ? self | ||
: typeof window !== 'undefined' ? window | ||
: typeof global !== 'undefined' ? global : {}; | ||
} | ||
/** | ||
* JSONP Polling constructor. | ||
@@ -50,4 +59,4 @@ * | ||
// we need to consider multiple engines in the same page | ||
if (!window.___eio) window.___eio = []; | ||
callbacks = window.___eio; | ||
var global = glob(); | ||
callbacks = global.___eio = (global.___eio || []); | ||
} | ||
@@ -54,0 +63,0 @@ |
@@ -404,3 +404,4 @@ /* global attachEvent */ | ||
} else if (typeof addEventListener === 'function') { | ||
addEventListener('beforeunload', unloadHandler, false); | ||
var terminationEvent = 'onpagehide' in self ? 'pagehide' : 'unload'; | ||
addEventListener(terminationEvent, unloadHandler, false); | ||
} | ||
@@ -407,0 +408,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"main": "lib/index.js", | ||
@@ -49,3 +49,3 @@ "homepage": "https://github.com/socketio/engine.io-client", | ||
"derequire": "^2.0.6", | ||
"engine.io": "3.3.0", | ||
"engine.io": "3.3.1", | ||
"eslint-config-standard": "4.4.0", | ||
@@ -52,0 +52,0 @@ "eslint-plugin-standard": "1.3.1", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
175836
5649