|
|
@ -1,9 +1,9 @@ |
|
|
|
(function () { |
|
|
|
const isIE = () => typeof window.CustomEvent !== "function"; |
|
|
|
if (typeof window.CustomEvent === "function") return false; // If not IE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isIE()) { |
|
|
|
function CustomEvent(event, params) { |
|
|
|
function CustomEvent(event, params) { |
|
|
|
params = params || { bubbles: false, cancelable: false, detail: undefined }; |
|
|
|
params = params || { bubbles: false, cancelable: false, detail: undefined }; |
|
|
|
var evt = document.createEvent("CustomEvent"); |
|
|
|
const evt = document.createEvent("CustomEvent"); |
|
|
|
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); |
|
|
|
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); |
|
|
|
|
|
|
|
|
|
|
|
return evt; |
|
|
|
return evt; |
|
|
@ -12,4 +12,4 @@ |
|
|
|
CustomEvent.prototype = window.Event.prototype; |
|
|
|
CustomEvent.prototype = window.Event.prototype; |
|
|
|
|
|
|
|
|
|
|
|
window.CustomEvent = CustomEvent; |
|
|
|
window.CustomEvent = CustomEvent; |
|
|
|
}()); |
|
|
|
} |
|
|
|