- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 29 Mar 2006 12:50:39 -0600
- To: Garrett Smith <dhtmlkitchen@gmail.com>
- CC: DOM mailing list <www-dom@w3.org>
Garrett Smith wrote:
> getElementsByTagName('body').item(0);
>
> (or for better performance)
>
> getElementsByTagName('body')[0];
For what it's worth, I believe the former is a tiny little bit faster
than the latter in Gecko, though the difference is pretty minuscule.
-Boris
Received on Wednesday, 29 March 2006 18:50:24 UTC