aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisko Hevery2011-03-08 20:20:49 -0800
committerMisko Hevery2011-03-08 20:23:19 -0800
commitf7a9ea6a418f6201638556b0925388e67a8b1b12 (patch)
treecf464948e8e5f2f2d4abd9baf1aa98e4cffd468b
parent627eba2b7cb2518d5e883e128d06ba25a80f9e9a (diff)
downloadangular.js-f7a9ea6a418f6201638556b0925388e67a8b1b12.tar.bz2
fix ie7 regression in jqLite which prevented
-rw-r--r--src/Angular.js4
-rw-r--r--src/jqLite.js10
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.