Skip to content

Instantly share code, notes, and snippets.

@stefanpenner
Last active December 16, 2015 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpenner/5423492 to your computer and use it in GitHub Desktop.
Save stefanpenner/5423492 to your computer and use it in GitHub Desktop.
var asdf = {
initialize: function(user, controller) {
var delegate = (function(){
retun function(statusFromApi){
// controller reference from outer function
// is retained
controller.statusUpdate(statusFromApi)
};
})();
callToCreateAndInitializeApi(delegate);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment