Fix Element extension when using the NWMatcher selector engine. (jddalton)
This commit is contained in:
parent
15c323b9ac
commit
ed27b225a5
2
Rakefile
2
Rakefile
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue