diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-01-21 01:59:40 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-01-21 23:14:39 +0300 |
commit | 1b63b3fea747127f5d90aea1b9908e96f96a90e0 (patch) | |
tree | 7d486a650af0da9254f7e038f95b24e572e1b9d1 /app/assets/javascripts/extensions | |
parent | 0ef587b6741d04d012561eab25362cb51685d682 (diff) |
Fix DropLab in IE11 v1
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/26785
Diffstat (limited to 'app/assets/javascripts/extensions')
-rw-r--r-- | app/assets/javascripts/extensions/custom_event.js.es6 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/extensions/custom_event.js.es6 b/app/assets/javascripts/extensions/custom_event.js.es6 new file mode 100644 index 00000000000..abedae4c1c7 --- /dev/null +++ b/app/assets/javascripts/extensions/custom_event.js.es6 @@ -0,0 +1,12 @@ +/* global CustomEvent */ +/* eslint-disable no-global-assign */ + +// Custom event support for IE +CustomEvent = function CustomEvent(event, parameters) { + const params = parameters || { bubbles: false, cancelable: false, detail: undefined }; + const evt = document.createEvent('CustomEvent'); + evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); + return evt; +}; + +CustomEvent.prototype = window.Event.prototype; |