Skip to content

Instantly share code, notes, and snippets.

@whytheplatypus
whytheplatypus / gist:1324810
Created October 29, 2011 17:22
Javascript event callback work around
function MyObject(){
this.button = document.getElementById("myButton");
var workAroundTheClosure = this;
this.button.addEventListener('click', function(){
workAroundTheClosure.buttionClick();
},
false);
}
MyObject.prototype.buttonClick = function(){