-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
While using demos in Internet Explorer, library throws error Object doesn't support this action. This error caused by below snippet.
scope.dispatchEvent(new CustomEvent('lmddbeforestart', {'bubbles': true})).
Reported error is coming because for IE versions >= 9, custom events must be created using document.createEvent() and then initialized using the initCustomEvent method of the previously created event.
So after doing stackoverflow I found we can fix this issue by adding below pollyfill provided by mozila firefox.
(function () {
if ( typeof window.CustomEvent === "function" ) return false;
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;
})();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels