aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.