return CustomEvent in polyfill if it doesn't exist

This commit is contained in:
Tim Lancina
2014-05-06 10:13:55 -05:00
parent 8d65371996
commit 6e231dbf26

View File

@@ -14,7 +14,8 @@
// Custom event polyfill
ionic.CustomEvent = window.CustomEvent || (function() {
function CustomEvent(event, params) {
var CustomEvent;
CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
@@ -35,6 +36,7 @@
return evt;
}
CustomEvent.prototype = window.Event.prototype;
return CustomEvent;
})();