Would this be a problem if there are no `<script>` tags in the document?

In another solution I've done this before, the latter handling badly formed HTML (e.g. blank line at the top of the file):
`(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script);`