Skip to content

Commit 696c7e7

Browse files
[chore] Release 3.3.1
1 parent 66b9e4a commit 696c7e7

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

engine.io.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,8 @@ return /******/ (function(modules) { // webpackBootstrap
13451345
if (typeof attachEvent === 'function') {
13461346
attachEvent('onunload', unloadHandler);
13471347
} else if (typeof addEventListener === 'function') {
1348-
addEventListener('beforeunload', unloadHandler, false);
1348+
var terminationEvent = 'onpagehide' in self ? 'pagehide' : 'unload';
1349+
addEventListener(terminationEvent, unloadHandler, false);
13491350
}
13501351
}
13511352

@@ -4039,7 +4040,7 @@ return /******/ (function(modules) { // webpackBootstrap
40394040
/* 25 */
40404041
/***/ function(module, exports, __webpack_require__) {
40414042

4042-
'use strict';
4043+
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
40434044

40444045
/**
40454046
* Module requirements.
@@ -4073,6 +4074,13 @@ return /******/ (function(modules) { // webpackBootstrap
40734074

40744075
function empty() {}
40754076

4077+
/**
4078+
* Until https://github.com/tc39/proposal-global is shipped.
4079+
*/
4080+
function glob() {
4081+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
4082+
}
4083+
40764084
/**
40774085
* JSONP Polling constructor.
40784086
*
@@ -4089,8 +4097,8 @@ return /******/ (function(modules) { // webpackBootstrap
40894097
// we do this here (lazily) to avoid unneeded global pollution
40904098
if (!callbacks) {
40914099
// we need to consider multiple engines in the same page
4092-
if (!window.___eio) window.___eio = [];
4093-
callbacks = window.___eio;
4100+
var global = glob();
4101+
callbacks = global.___eio = global.___eio || [];
40944102
}
40954103

40964104
// callback identifier
@@ -4271,6 +4279,7 @@ return /******/ (function(modules) { // webpackBootstrap
42714279
this.iframe.onload = complete;
42724280
}
42734281
};
4282+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
42744283

42754284
/***/ },
42764285
/* 26 */

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "engine.io-client",
33
"description": "Client for the realtime Engine",
44
"license": "MIT",
5-
"version": "3.3.0",
5+
"version": "3.3.1",
66
"main": "lib/index.js",
77
"homepage": "https://github.com/socketio/engine.io-client",
88
"contributors": [
@@ -45,7 +45,7 @@
4545
"concat-stream": "^1.6.0",
4646
"del": "^2.2.2",
4747
"derequire": "^2.0.6",
48-
"engine.io": "3.3.0",
48+
"engine.io": "3.3.1",
4949
"eslint-config-standard": "4.4.0",
5050
"eslint-plugin-standard": "1.3.1",
5151
"expect.js": "^0.3.1",

0 commit comments

Comments
 (0)