use Array::slice
This commit is contained in:
parent
c4471931dc
commit
f056ceba86
@ -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() {
|
||||
|
||||
@ -299,7 +299,7 @@ else
|
||||
|
||||
$$ = (selector, root=d.body) ->
|
||||
result = root.querySelectorAll selector
|
||||
node for node in result
|
||||
Array::slice.call result
|
||||
|
||||
#funks
|
||||
expandComment =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user