Browse Source

KERNEL-14316 chore: 代码调整

es6
Treecat 2 years ago
parent
commit
70ce2bf293
  1. 10
      packages/fineui/src/polyfill/event.js

10
packages/fineui/src/polyfill/event.js

@ -1,9 +1,9 @@
(function () {
if (typeof window.CustomEvent === "function") return false; // If not IE
const isIE = () => typeof window.CustomEvent !== "function";
function CustomEvent (event, params) {
if (isIE()) {
function CustomEvent(event, params) {
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);
return evt;
@ -12,4 +12,4 @@
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
}());
}

Loading…
Cancel
Save