Fix Element extension when using the NWMatcher selector engine. (jddalton)

This commit is contained in:
Tobie Langel 2009-10-23 07:31:37 +02:00
parent 15c323b9ac
commit ed27b225a5
2 changed files with 6 additions and 2 deletions

View File

@ -102,7 +102,7 @@ module PrototypeHelper
end
def self.require_nwmatcher
if !File.exists?(File.join(ROOT_DIR, 'vendor', 'nwmatcher', 'src', 'nwmatcher.js'))
if !File.exists?(File.join(ROOT_DIR, 'vendor', 'nwmatcher', 'nwmatcher', 'src', 'nwmatcher.js'))
exit unless get_submodule("NWMmatcher", "nwmatcher/nwmatcher")
end
end

View File

@ -8,7 +8,11 @@ delete Prototype._original_nw;
Prototype.Selector = (function(NW) {
function select(selector, scope) {
return NW.select(selector, scope || document, null, Element.extend);
var results = [];
NW.select(selector, scope || document, null, function(element) {
results.push(Element.extend(element));
});
return results;
}
function filter(elements, selector) {