I have often used, and seen recommended, dom-access structures like this for adding content to pages dynamically:
loader = document.createElement(\'script\')
I can’t see any reason why it would matter in practice whether you insert your elements into the or the element. In theory, I guess it’s nice to have the runtime DOM resemble the would-be static one.
As for document.head, it’s part of HTML5 and apparently already implemented in the latest builds of all major browsers (see http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-head).