I am trying to add a little js code into the html of an external webpage using chrome console. I would use iMacros but it has very limited capabilities for my needs.
This is just an example:
document.getElementById('x').innerHTML =
"<script type='text/javascript'>
alert(\"yes\");
</script>";
When I run it, it says "SyntaxError: Unexpected token ILLEGAL". Is there any workaround or how can I do what I want to do?
<script>tag inserted viainnerHTMLshould not execute." developer.mozilla.org/en-US/docs/Web/API/Element.innerHTML