Is there any other way?  I don't want it to be overwritten. Can i use merge
or something?

 

From: Sean McArthur [mailto:sean.mons...@gmail.com] 
Sent: Wednesday, 29 June 2011 11:26 AM
To: mootools-users@googlegroups.com
Subject: Re: [Moo] default Request onSuccess function

 

Yes, Class.implement will merge objects if they already exist on the object.

 

Request.implement('options', { onSuccess: function() { } });

 

That will give a default onSuccess, but know that if you ever pass an
onSuccess as the options in the constructor it will override (as Options
always does).

 

On Tue, Jun 28, 2011 at 5:52 PM, Steve Onnis <st...@cfcentral.com.au> wrote:

Is it possible to set a default function that will always run for a Request
call?  Do you just need to use Implement or something?

 

Steve

 

Reply via email to