I have set of Javascript loaded in page and that will be executed onclick of some button . My browser is IE11 latest version and since my application tools doesn't support IE11 I made that change to run application and anything inside it in document emulation mode to IE9 (with "X-UA-Compatible" ) And I have added my domain in compatibility list in IE11. I am getting a very surprising issue. All my JS code executes fine if console (F12 developer tools) is keep opened. However it stops executing certain part of JS once console is off in IE11. Note that, none of my JS code has anything with console.log . And I have explicitely tried adding below in my JS and it is still not working,
<meta http-equiv="X-UA-Compatible" content="IE=9" />
Can anyone help what could be the possible issue ? Thanks and appreciate your help.
I am possibly hitting similar issue mentioned below : Why does JavaScript only work after opening developer tools in IE once?
but below doesn't work for me when I add my code inside head section or body section : so not sure if IE11 this is still a problem and how to resolve this:
<script>
if ( ! window.console ) console = { log: function(){} };
if(!console) {console={}; console.log = function(){};}
</script>