Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2015-02-09 06:40:22 +0300
committerXhmikosR <xhmikosr@gmail.com>2015-02-09 06:40:22 +0300
commit12b869e68e46f13efaf6ddabf331f7f49a1f2c15 (patch)
treefa8f70133abc90533aa16648b1b97288f0fc90ad
parentf39c3db7daa32e5338d4ebd4f638740328ab17eb (diff)
parente3445b242e0972d87b71154408b5755b859fe404 (diff)
Merge pull request #748 from tinymins/master
Fix the `CustomEvent` compatibility problem
-rwxr-xr-xjs/common.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/common.js b/js/common.js
index 4cad187..eb462d5 100755
--- a/js/common.js
+++ b/js/common.js
@@ -9,6 +9,15 @@
!(function () {
'use strict';
+ // Compatible With CustomEvent
+ if (!window.CustomEvent) {
+ window.CustomEvent = function (type, config) {
+ var e = document.createEvent('CustomEvent');
+ e.initCustomEvent(type, config.bubbles, config.cancelable, config.detail);
+ return e;
+ };
+ }
+
// Create Ratchet namespace
if (typeof window.RATCHET === 'undefined') {
window.RATCHET = {};