Skip to content

Instantly share code, notes, and snippets.

@boarnoah
Created February 4, 2016 01:47
Show Gist options
  • Save boarnoah/df88d579d5f5ca8bc42b to your computer and use it in GitHub Desktop.
Save boarnoah/df88d579d5f5ca8bc42b to your computer and use it in GitHub Desktop.
Stack Overflow question
//http://stackoverflow.com/questions/35190920/wrapping-objects-in-js-best-pratices
// later in the code:
obj.addListener('click', function(){
//Here I would prefer having access to wrapper's other children/functions
console.log(wrapper.anotherProperty);
console.log(wrapper.anotherFunction());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment