fix ie7 regression in jqLite which prevented

This commit is contained in:
Misko Hevery 2011-03-08 20:20:49 -08:00
parent 627eba2b7c
commit f7a9ea6a41
2 changed files with 9 additions and 5 deletions

View file

@ -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,

View file

@ -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.