use Array::slice
This commit is contained in:
parent
c4471931dc
commit
f056ceba86
@ -433,17 +433,12 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
$$ = function(selector, root) {
|
$$ = function(selector, root) {
|
||||||
var node, result, _i, _len, _results;
|
var result;
|
||||||
if (root == null) {
|
if (root == null) {
|
||||||
root = d.body;
|
root = d.body;
|
||||||
}
|
}
|
||||||
result = root.querySelectorAll(selector);
|
result = root.querySelectorAll(selector);
|
||||||
_results = [];
|
return Array.prototype.slice.call(result);
|
||||||
for (_i = 0, _len = result.length; _i < _len; _i++) {
|
|
||||||
node = result[_i];
|
|
||||||
_results.push(node);
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
};
|
};
|
||||||
expandComment = {
|
expandComment = {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
|||||||
@ -299,7 +299,7 @@ else
|
|||||||
|
|
||||||
$$ = (selector, root=d.body) ->
|
$$ = (selector, root=d.body) ->
|
||||||
result = root.querySelectorAll selector
|
result = root.querySelectorAll selector
|
||||||
node for node in result
|
Array::slice.call result
|
||||||
|
|
||||||
#funks
|
#funks
|
||||||
expandComment =
|
expandComment =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user