Yeah, that looks right. I updated the fiddle to reflect this and it works as I expected. The downfall to this is... essentially I'd want it to work like merging options and not get rid of the ones that are already there, but only replace the ones I've provided. Of course you can't remove events of individual types unless you have a reference to the original function....
~Philip On Thu, Mar 10, 2011 at 3:40 PM, Andrea Dessì <[email protected]> wrote: > On Thu, Mar 10, 2011 at 22:10, Philip Thompson <[email protected]>wrote: > >> Well, that does explain it. Is there any reason why the on* methods aren't >> also options to send()? >> >> Thanks, >> ~Philip > > > I suppose because they are attached to events, or not? > So if we want to change it's behaviour we should remove all the events and > add them again... > > #JS > this.request.removeEvents(); > this.request.addEvent("complete",function(){ > console.log("complete b+"); > }); > > that's right? > > -- > Andrea >
