diff --git a/src/ie9.js b/src/ie9.js index 9343675ea..01487ee96 100644 --- a/src/ie9.js +++ b/src/ie9.js @@ -1,12 +1,12 @@ // CustomEvent constructor polyfill // From MDN -(function () { +(function (undef) { function CustomEvent ( event, params ) { - params = params || { bubbles: false, cancelable: false, detail: undefined }; + params = params || { bubbles: false, cancelable: false, detail: undef }; var evt = document.createEvent( 'CustomEvent' ); evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); return evt; - }; + } CustomEvent.prototype = window.Event.prototype; @@ -20,8 +20,8 @@ var vendors = ['ms', 'moz', 'webkit', 'o']; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] - || window[vendors[x]+'CancelRequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || + window[vendors[x]+'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) diff --git a/src/utilities.js b/src/utilities.js index 76a011df8..ab48fc3e8 100644 --- a/src/utilities.js +++ b/src/utilities.js @@ -34,13 +34,14 @@ var $extend = function(destination) { var $each = function(obj,callback) { if(!obj) return; + var i; if(typeof obj.length !== 'undefined') { - for(var i=0; i