Yep! So what's the reason not to do it ;)<div><br></div><div>-- Yehuda<br><br><div class="gmail_quote">On Sun, Sep 20, 2009 at 2:20 PM, Joseph Pecoraro <span dir="ltr"><<a href="mailto:joepeck02@gmail.com">joepeck02@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sep 20, 2009, at 4: 24PM, Juriy Zaytsev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Speaking of `document.head`, I think Mootools does exactly that.<br>
</blockquote>
<br>
<br></div>
Good thinking.  I took a look at some JavaScript Libraries / Frameworks.  Here are some quick counts of how many times I could see that they use the "getElementsByTagName" method of getting the "head" element:<br>


<br>
  - MooTools 1.2.3 has: 2<br>
  - jQuery 1.3.2 has: 2<br>
  - Ext 3.0.0 has: 5<br>
  - YUI 3.0.0b1 has: >10<br>
  - Prototype 1.6.1, MochiKit 1.4.2, Dojo 1.3.2 have: 0<br>
<br>
I am not making any criticism of the libraries.  I'm just re-enforcing the fact that it is a popular method of getting the "head" element, and adding document.head would be a worthwhile improvement.<br>
<br>
- Joe<br>
</blockquote></div><br><br clear="all"><br>-- <br>Yehuda Katz<br>Developer | Engine Yard<br>(ph) 718.877.1325<br>
</div>