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:
authorZhai YiMing <tinymins@gmail.com>2015-02-08 05:21:16 +0300
committerZhai YiMing <tinymins@gmail.com>2015-02-08 05:21:16 +0300
commite3445b242e0972d87b71154408b5755b859fe404 (patch)
tree092dfe35cf65ca1844d7950aee80bba1e08713af
parent8e118d19e452035d1b00576fdaff0f8b8a0acb1e (diff)
Compatible With CustomEvent
-rwxr-xr-xjs/common.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/common.js b/js/common.js
index 770f456..d699165 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 = {};