I have some javascript which will create some sort of widget on a page. I will be giving this snippet to clients so I want them to have to do very little.
Can you replace a Script Tag with a Div using Javascript in that Script Tag?
Yes. When the element is reached, assuming it is not a defer or async script, it will be the last script element in the page so far. So you can say, either inline or in an external script: