You need to be careful here. $merge recurses into objects, but if those objects are Natives (like funcitons) they themselves contain members that are also functions (like function.bind). This can lead to an infinite loop.
On Tue, Oct 7, 2008 at 12:58 AM, Iván N Paz < [EMAIL PROTECTED]<[EMAIL PROTECTED]> > wrote: > clone? > > On 10/6/08, jon <[EMAIL > PROTECTED]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1302944&i=0>> > wrote: > > > > $merge doesn't copy and object's functions, is there a way to copy an > > object better than using $merge? > > var copy=$merge(obj); > > > > thanks > > > > > -- > ◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦ > www.ivanicus.com > > > ------------------------------ > View message @ http://n2.nabble.com/copy-an-object-tp1302656p1302944.html > To start a new topic under MooTools Users, email > [EMAIL PROTECTED]<[EMAIL PROTECTED]> > To unsubscribe from MooTools Users, click here< (link removed) >. > > > ----- The MooTools Tutorial: http://www.mootorial.com www.mootorial.com CNET Clientside: http://clientside.cnet.com clientside.cnet.com -- View this message in context: http://n2.nabble.com/copy-an-object-tp1302656p1302948.html Sent from the MooTools Users mailing list archive at Nabble.com.
