Skip to content

Instantly share code, notes, and snippets.

@jpcody
Created July 27, 2011 16:54
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 jpcody/1109812 to your computer and use it in GitHub Desktop.
Save jpcody/1109812 to your computer and use it in GitHub Desktop.
var myObj = {};
myObj.nestedObj = {
myReturns : {
first : 'foo',
second : 'bar'
},
myCaller : function(){
return this.myWrapper.doBind();
},
myWrapper : {
doBind : _.bind(function(){
console.log(this);
return this.first;
}, myObj.nestedObj)
}
};
myObj.nestedObj.myCaller();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment