Advertisement
Guest User

Untitled

a guest
Sep 10th, 2015
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Foo(){
  2.  
  3. ...
  4. this.something = something;
  5. }
  6.  
  7. Foo.prototype.createPlayer = function(){
  8. //create a button object, set some properties, whatever
  9. var button = ...
  10. var self = this;
  11. button.onclick = function(self){
  12. self.something = somethingElse;
  13. }
  14. }
Advertisement
RAW Paste Data Copied
Advertisement