Skip to content

Commit

Permalink
fix: fix ie edge CustomEvent bug (#567)
Browse files Browse the repository at this point in the history
switches details to be included in the CustomEvent.initCustomEvent constructor

fix #498
  • Loading branch information
Jarch09 authored Mar 31, 2020
1 parent 22c3bac commit b7f04f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/decorators/staticMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const dispatchGlobalEvent = (eventName, opts) => {
event = new window.CustomEvent(eventName, { detail: opts });
} else {
event = document.createEvent("Event");
event.initEvent(eventName, false, true);
event.detail = opts;
event.initEvent(eventName, false, true, opts);
}

window.dispatchEvent(event);
Expand Down

0 comments on commit b7f04f7

Please sign in to comment.