Closed jdanyow closed 9 years ago
What is the error?
how bout a 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;
})();
its taken from MDN, which seems to be currently down. https://developer.mozilla.org/de/docs/Web/API/CustomEvent
I think we need to polyfill the CustomEvent ctor in IE. I remember seeing one inlined in one of the other projects, but I'm having a hard time finding it...
I thought we already had this polyfill in the framework...let me check.
In the framework library we have this:
if (!window.CustomEvent || typeof window.CustomEvent !== 'function') {
var CustomEvent = function(event, params) {
var 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;
}
Should I be polyfilling it in aurelia-breeze for the purposes of testing?
https://github.com/aurelia/http-client/blob/master/src/http-client.js#L19