lets say I have
function cookie(a, b) {
this.a = a;
this.b = b;
this.sayA = function() {
alert(this.a);
}.bind(this);
}
cookie.prototype.sayB = function() {
alert(this.b);
}
var nc = new cookie(1, 2);
addEventListener("load", nc.sayA);
addEventListener("load", nc.sayB);
So, sayA finds the context I want since its bound to the object that holds it, sayB has no clue whats up though. How would I bind "this" to a function that I define in the object prototype?