Re: Minimizing dots for accessing properties

Joris Huizer <[email protected]> Tue, 23 May 2006 12:45:08 +0200
Newsgroups gmane.comp.web.dom.wdf
Message-ID <[email protected]>
Maninder, Singh wrote:
> Would it be better if I cached the object?
> 
> eg:
> 
> var E = Mandy.util.Error;
> E.test();
> E.test2();
> E.test3();
> 
> 
> Instead of 
> 
> Mandy.util.Error.test();
> Mandy.util.Error.test1();
> Mandy.util.Error.test2(); 
> 
> Thanks,
> Mandy. 
> 

(sorry about that last email, it was not finished)
You'll get tired of writing Mandy.util.Error like that all the time; It 
probably depends on the browser, but I think javascript engines might 
cache a number of recently-used variables/properties or so, so for speed 
it may not make a difference

HTH,

Joris


------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/9rHolB/TM
--------------------------------------------------------------------~-> 

Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wdf-dom/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/