Clean-up NWMatcher proxy.
This commit is contained in:
parent
f6f6955a71
commit
7f5ce1e6c2
8
vendor/nwmatcher/selector_engine.js
vendored
8
vendor/nwmatcher/selector_engine.js
vendored
@ -8,19 +8,19 @@ delete Prototype._original_nw;
|
||||
|
||||
Prototype.Selector = (function(NW) {
|
||||
function select(selector, scope) {
|
||||
var results = [];
|
||||
var results = [], resultsIndex = 0;
|
||||
NW.select(selector, scope || document, null, function(element) {
|
||||
results.push(Element.extend(element));
|
||||
results[resultsIndex++] = Element.extend(element);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
|
||||
function filter(elements, selector) {
|
||||
var results = [], element;
|
||||
var results = [], resultsIndex = 0, element;
|
||||
for (var i = 0, length = elements.length; i < length; i++) {
|
||||
element = elements[i];
|
||||
if (NW.match(element, selector)) {
|
||||
results.push(Element.extend(element))
|
||||
results[resultsIndex++] = Element.extend(element);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
|
Loading…
Reference in New Issue
Block a user