Luisgo,

On Jun 5, 11:15 am, Luisgo <lgo...@gmail.com> wrote:
> Is there a legitimate reason other than writing less code for chaining
> methods? Specifically, is there a performance advantage other than
> overall site performance thanks to download speeds as a consequence of
> less code?

I'm not aware of any performance difference, so it's mostly a matter
of taste. Someone else here might have details on a difference, but
I'm guessing is negligible.

> PS: I'm trying to avoid doing the multiline chaining:
>
>         this.element = new Element("div",{"class":this.settings.className})
>                                         .absolutize()
>                                                 .hide();

I would make sure you make the last character an operator when
breaking a line like that to avoid semicolon insertion problems. See
http://javascript.crockford.com/code.html.

Also, this topic and the previous on this thread would probably be
better posted in the Prototype and Scriptaculous group rather than the
Core group, since this doesn't pertain to the Prototype core.

For your overlay class, you might have a look a http://livepipe.net
and its Control.Window and Object.Event objects for possible code &
ideas.

Nathan
--~--~---------~--~----~------------~-------~--~----~
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 
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to