From e3445b242e0972d87b71154408b5755b859fe404 Mon Sep 17 00:00:00 2001 From: Zhai YiMing Date: Sun, 8 Feb 2015 10:21:16 +0800 Subject: Compatible With CustomEvent --- js/common.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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 = {}; -- cgit v1.2.3