Skip to content

Instantly share code, notes, and snippets.

@bnolan
Created July 1, 2010 01:44
Show Gist options
  • Save bnolan/459435 to your computer and use it in GitHub Desktop.
Save bnolan/459435 to your computer and use it in GitHub Desktop.
redraw: =>
for x in y
$('body').click =>
@widgify(x)
Converts to this... The block inside the for loop isn't passed (this) as a context.
PlacesController.prototype.redraw = function() {
var _a, _b, _c, _d, _e, _f, ol;
_b = y;
for (_a = 0, _c = _b.length; _a < _c; _a++) {
(function() {
var x = _b[_a];
return $('body').click((function(__this) {
var __func = function() {
return this.widgify(x);
};
return (function() {
return __func.apply(__this, arguments);
});
})(this));
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment