How do I go about using DOMDocument's createElement to create a new Javascript object in a document?
The best I have achieved so far is:
$node = $doc->createElement("script");
However, this outputs:
<script></script>
What I am looking to output is:
<script type="text/javascript"></script>
typeattribute is redundant