JS Добавить контент в тег сценария

script.text = "function DrawIt(){canvas1.fillRect(1,2,30,40)}"

// Means
<script>
function DrawIt(){canvas1.fillRect(1,2,30,40)}
</script>
florinrelea