From f7a9ea6a418f6201638556b0925388e67a8b1b12 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 8 Mar 2011 20:20:49 -0800 Subject: fix ie7 regression in jqLite which prevented --- src/Angular.js | 4 ++-- src/jqLite.js | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Angular.js b/src/Angular.js index 00188d6f..b5dc7e5e 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -89,8 +89,8 @@ var _undefined = undefined, msie = parseInt((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1], 10), jqLite, // delay binding since jQuery could be loaded after us. jQuery, // delay binding - slice = Array.prototype.slice, - push = Array.prototype.push, + slice = [].slice, + push = [].push, error = window[$console] ? bind(window[$console], window[$console]['error'] || noop) : noop, diff --git a/src/jqLite.js b/src/jqLite.js index 2dd2ac47..cda8ec70 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -145,7 +145,7 @@ function JQLiteAddNodes(root, elements) { ////////////////////////////////////////// // Functions which are declared directly. ////////////////////////////////////////// -var JQLitePrototype = JQLite.prototype = extend([], { +var JQLitePrototype = JQLite.prototype = { ready: function(fn) { var fired = false; @@ -163,8 +163,12 @@ var JQLitePrototype = JQLite.prototype = extend([], { var value = []; forEach(this, function(e){ value.push('' + e);}); return '[' + value.join(', ') + ']'; - } -}); + }, + length: 0, + push: push, + sort: [].sort, + splice: [].splice +}; ////////////////////////////////////////// // Functions iterating getter/setters. -- cgit v1.2.3