I am getting the following error in IE9:
\"Object doesn\'t support this action\".
There are various question about this, but mine is specifically for the followi
You can use a javascript function to detect if the browser is IE11 or lower then apply the next polyfill:
(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;
})();
The polyfill from above is taken from MDN: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent