I\'m dealing with a system where the following Javascript code (which is out of my control) is being executed early in the page
if (!(\"console\" in window)
This seems to work:
iframe = document.createElement('iframe'); document.body.appendChild(iframe); console = iframe.contentWindow.console;
However it looks like you cannot remove the iframe