diff options
| author | Misko Hevery | 2011-03-08 20:20:49 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-03-08 20:23:19 -0800 |
| commit | f7a9ea6a418f6201638556b0925388e67a8b1b12 (patch) | |
| tree | cf464948e8e5f2f2d4abd9baf1aa98e4cffd468b | |
| parent | 627eba2b7cb2518d5e883e128d06ba25a80f9e9a (diff) | |
| download | angular.js-f7a9ea6a418f6201638556b0925388e67a8b1b12.tar.bz2 | |
fix ie7 regression in jqLite which prevented
| -rw-r--r-- | src/Angular.js | 4 | ||||
| -rw-r--r-- | 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. |
