On Nov 27, 8:37 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> Just to be clear, main.js doesn't define a "()" function, it defines an
> *anonymous* function, and you can have as many of those as you want.
>
> For example, this is perfectly legal:
>
>     (function() {
>         // code here
>     })();
>
>     (function() {
>         // more code here
>     })();
>
> It's just as if you had written:
>
>     function a() {
>         // code here
>     }
>     a();
>
>     function b() {
>         // more code here
>     }
>     b();
>
> -Mike

Thanks for the clarification.  I think I understand it now.  In your
second example, both "a" & "b" will be added into the global name
space but "(function(){ ... })();" is able to suppress it.

Slightly off topic, it is too bad neither VML nor CANVAS has the
ability to cache the building of the same shape from a previous run.

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

Reply via email to