So is this something worthy of core prototype?

On 1/26/08, kangax <[EMAIL PROTECTED]> wrote:
>
> Simple subclassing should do the job (haven't tested but it should
> work):
>
> Ajax.Replacer = Class.create(Ajax.Updater, {
>   initialize: function($super, container, url, options) {
>     options = options || { };
>     options.onComplete = (options.onComplete ||
> Prototype.emptyFunction)
>       .wrap(function(proceed, transport, json) {
>         $(container).replace(transport.responseText);
>         proceed(transport, json);
>       })
>     $super(container, url, options);
>   }
> })
>
> new Ajax.Replacer("someElement", "someUrl");
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to