diff options
author | XhmikosR <xhmikosr@gmail.com> | 2015-02-09 06:40:22 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2015-02-09 06:40:22 +0300 |
commit | 12b869e68e46f13efaf6ddabf331f7f49a1f2c15 (patch) | |
tree | fa8f70133abc90533aa16648b1b97288f0fc90ad | |
parent | f39c3db7daa32e5338d4ebd4f638740328ab17eb (diff) | |
parent | e3445b242e0972d87b71154408b5755b859fe404 (diff) |
Merge pull request #748 from tinymins/master
Fix the `CustomEvent` compatibility problem
-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 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 = {}; |