Retrieveing ALL head elements in document including iframe
<p>I'm trying to add <code>style</code> elements to all ALL the <code>head</code> elements in a document, including those in an iframe.</p>

<p>if i use</p>

<pre><code>var heads = document.getElementsByTagName('head');
</code></pre>

<p>It just returns the first head element and not the ones in the iframe.
this is the complete code :</p>

<pre><code>var heads = document.getElementsByTagName("head");
var style = document.createElement("style");
style.type = "text/css";
style.appendChild(document.createTextNode(css));
for(var i=0;i&lt;heads.length;i++) heads[i].appendChild(style);
</code></pre>

<p>but this doesn't seem to work!
am i doing something wrong here...?</p>
