use Array::slice

This commit is contained in:
James Campos 2011-05-07 18:49:51 -07:00
parent c4471931dc
commit f056ceba86
2 changed files with 3 additions and 8 deletions

View File

@ -433,17 +433,12 @@
});
}
$$ = function(selector, root) {
var node, result, _i, _len, _results;
var result;
if (root == null) {
root = d.body;
}
result = root.querySelectorAll(selector);
_results = [];
for (_i = 0, _len = result.length; _i < _len; _i++) {
node = result[_i];
_results.push(node);
}
return _results;
return Array.prototype.slice.call(result);
};
expandComment = {
init: function() {

View File

@ -299,7 +299,7 @@ else
$$ = (selector, root=d.body) ->
result = root.querySelectorAll selector
node for node in result
Array::slice.call result
#funks
expandComment =