Im trying to add a new text to a existing in the simplest way posible, in my case I can only modify the script that is inside a paragraph element but Im getting this error Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node
. How can I make this works in the shortest code possible?
<!-- Many elements above this -->
<p>
This a part of the text
<script>
document.currentScript.parentNode.appendChild(" and this is the new text added");
</script>
</p>
<!-- Many elements under this -->