Skip to content

Commit

Permalink
Merge pull request #98 from ConnectHolland/ie-missing-customevent
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsch committed Jun 14, 2021
2 parents 233850f + 7023d0d commit 776f268
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Resources/public/js/cookie_consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,16 @@ function serializeForm(form, clickedButton) {

return serialized.join('&');
}

if ( typeof window.CustomEvent !== "function" ) {
function CustomEvent(event, params) {
params = params || {bubbles: false, cancelable: false, detail: undefined};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
}

CustomEvent.prototype = window.Event.prototype;

window.CustomEvent = CustomEvent;
}

0 comments on commit 776f268

Please sign in to comment.