Fixed bad polyfill for #181

This commit is contained in:
Max Lynch
2013-11-23 08:15:17 -06:00
parent 963e0e3ae6
commit a5a323d85c
4 changed files with 30 additions and 30 deletions

1
dist/css/ionic.css vendored
View File

@@ -1,4 +1,3 @@
@charset "UTF-8";
/**
* Copyright 2013 Drifty Co.
* http://drifty.com/

View File

@@ -1,4 +1,3 @@
@charset "UTF-8";
/**
* Nav controllers and header bar animations
*/

29
dist/js/ionic.js vendored
View File

@@ -219,25 +219,26 @@ window.ionic = {
(function(ionic) {
// Custom event polyfill
if(!window.CustomEvent) {
var CustomEvent;
(function() {
var CustomEvent;
CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
CustomEvent.prototype = window.Event.prototype;
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
window.CustomEvent = CustomEvent;
})();
}
ionic.EventController = {

View File

@@ -13,25 +13,26 @@
(function(ionic) {
// Custom event polyfill
if(!window.CustomEvent) {
var CustomEvent;
(function() {
var CustomEvent;
CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
CustomEvent.prototype = window.Event.prototype;
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
window.CustomEvent = CustomEvent;
})();
}
ionic.EventController = {