Oh, right!

BindWithEvent is just this:

bindWithEvent would have let you do this:
myElement.addEvent('click', myFunction.bindWithEvent(this, [foo, bar]);

myFunction = function(event, foo, bar){ ... };

To achieve the same thing, you must do this:

myElement.addEvent('click', function(event){
    myFunction(event, foo, bar);
}.bind(this));

Copied from Aaron in a previous email.
On Nov 27, 2010 11:14 AM, "Dailce" <[email protected]> wrote:
> The issue is with 1.3 I'm getting "MyCart.add.bindWithEvent is not a
> function" error.
> With 1.2 my code works, just now that bindWithEvent is deprecated I'm
> not sure how to rewrite that line of code.

Reply via email to