Welcome to mirror list, hosted at ThFree Co, Russian Federation.

custom_event_polyfill.js.es6 « utils « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5ae978010c9c0379e5d95f21e8b990cd4ba9a458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/**
 * CustomEvent support for IE
 */
if (typeof window.CustomEvent !== 'function') {
  window.CustomEvent = function CustomEvent(e, params) {
    const options = params || { bubbles: false, cancelable: false, detail: undefined };
    const evt = document.createEvent('CustomEvent');
    evt.initCustomEvent(e, options.bubbles, options.cancelable, options.detail);
    return evt;
  };
  window.CustomEvent.prototype = window.Event.prototype;
}