Use forEach in nodeInserted too.

This commit is contained in:
Nicolas Stepien 2011-10-10 13:33:35 +02:00
parent 6ffcf00871
commit 99d5f8b1a9
2 changed files with 5 additions and 10 deletions

View File

@ -2779,16 +2779,12 @@
return location.href = url;
};
nodeInserted = function(e) {
var callback, target, _i, _len, _ref, _results;
var target;
target = e.target;
if (target.nodeName === 'TABLE') {
_ref = g.callbacks;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
callback = _ref[_i];
_results.push(callback(target));
}
return _results;
return g.callbacks.forEach(function(callback) {
return callback(target);
});
}
};
imgHover = {

View File

@ -2034,8 +2034,7 @@ redirect = ->
nodeInserted = (e) ->
{target} = e
if target.nodeName is 'TABLE'
for callback in g.callbacks
callback target
g.callbacks.forEach (callback) -> callback target
imgHover =
init: ->