That's interresting and seems well implemented. But I don't see why it's
better then if(condition) el.adopt(stuff), specially on the web where every
byte counts.

2010/3/29 jacob <[email protected]>

> Anyone ever implemented something like this? or have a nicer way of
> doing it?
>
> http://mootools.net/shell/KPPNg/
>
> Element.implement({
>
>    conditionalAdopt: function(){
>        if(Array.prototype.splice.apply(arguments,[0,1])[0]){
>            Array.flatten(arguments).each(function(element){
>                element = document.id(element, true);
>                if (element) this.appendChild(element);
>            }, this);
>            return this;
>        }
>        return this;
>    }
>
> });
>
> To unsubscribe from this group, send email to mootools-users+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

To unsubscribe from this group, send email to 
mootools-users+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to