diff options
author | Zhai YiMing <tinymins@gmail.com> | 2015-02-08 05:21:16 +0300 |
---|---|---|
committer | Zhai YiMing <tinymins@gmail.com> | 2015-02-08 05:21:16 +0300 |
commit | e3445b242e0972d87b71154408b5755b859fe404 (patch) | |
tree | 092dfe35cf65ca1844d7950aee80bba1e08713af | |
parent | 8e118d19e452035d1b00576fdaff0f8b8a0acb1e (diff) |
Compatible With CustomEvent
-rwxr-xr-x | js/common.js | 9 |
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 = {}; |