Skip to content

Commit

Permalink
Fixed bad polyfill for #181
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Lynch committed Nov 23, 2013
1 parent 963e0e3 commit a5a323d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
1 change: 0 additions & 1 deletion dist/css/ionic.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@charset "UTF-8";
/**
* Copyright 2013 Drifty Co.
* http://drifty.com/
Expand Down
1 change: 0 additions & 1 deletion dist/css/themes/ionic-ios7.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@charset "UTF-8";
/**
* Nav controllers and header bar animations
*/
Expand Down
31 changes: 16 additions & 15 deletions dist/js/ionic.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,25 +219,26 @@ window.ionic = {
(function(ionic) {

// Custom event polyfill

if(!window.CustomEvent) {
var CustomEvent;

CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
(function() {
var CustomEvent;

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 = {
Expand Down
31 changes: 16 additions & 15 deletions js/utils/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,26 @@
(function(ionic) {

// Custom event polyfill

if(!window.CustomEvent) {
var CustomEvent;

CustomEvent = function(event, params) {
var evt;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
(function() {
var CustomEvent;

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 = {
Expand Down

0 comments on commit a5a323d

Please sign in to comment.