I tried a brief example:
document.body.innerHTML= '<script>alert(123);</script>'
I was expecting an alert window, but instead, nothing happened.
Why? How can I inject something to DOM that would actually run?
My intention is to be able to replace the current content of the page with completely new content, having possibly javascript calls...
PS: my original intention is to replace current page with a new one - and these instructions are to be done inside chrome extension's content script.