On Jul 21, 2006, at 4:47 PM, Andreas Wahlin wrote:
If you use prototype, there's a modified version in there that adds .bind(this)

*cough* slightly off topic. The .bind(this) just makes the this keyword accessibly in the function that you bind it to, right? Sort of like passing it in as an argument when you call the function.

Andreas

.bind() replaces every use of "this" inside with a call to the object you put in the argument. Like so:

function(){
alert(this.thinggy);
}.bind({thinggy: 'Howdy!!!'})


thomas Aylott—subtleGradient