当前位置:网站首页>Website with JS doesn't work in IE9 until the Developer Tools is activated

Website with JS doesn't work in IE9 until the Developer Tools is activated

2022-07-03 17:32:00 javail

problem :

I'm developing a complex website that heavily leverages jQuery and a number of scripts. I am developing a complex website , It makes full use of jQuery And many scripts .On load of the site, none of my scripting is working (though I can confirm that other scripts are functioning fine). When loading the website , None of my scripts work ( Although I can confirm that other scripts are working properly ).I wouldn't be posting such a lame question here on SE except for one thing: Except for one thing , I won't be here SE Publish such a lame question on :

The instant I hit F12 to turn on developer tools so I can debug my issue, everything instantly works perfectly! I click F12 Open developer tools , So that I can debug my problem , Everything is perfect immediately !

Worse, if I shut down the browser, start it up, turn on Dev Tools first and visit the site, everything works as expected. What's worse is , If I close my browser , To start it , Start by opening Dev Tools And visit the site , Everything works as expected .

So I can't even debug the darned problem because Dev Tools fixes it! So I can't even debug this problem because Dev Tools Fixed it !What could Dev Tools be doing that makes things work?Dev Tools What can be done to make things work ?Does it change the UA (I do some jQuery.browser detection)? Has it changed UA( I did some jQuery.browser testing )?Does it do something to doctype? It's right doctype Is it useful? ?

EDIT edit

All my console logging is wrapped in the following wrapper utility function: All my console logging is contained in the following wrapper utility functions :

   function log(msg){    if (console){        console.log(msg);    }   }

Any thoughts or suggestions I could try would be welcome. Any idea or suggestion I can try will be welcomed .I'll post here if I find a solution. If I find a solution , I will post it here .


Solution :

Reference resources : https://stackoom.com/en/question/Xxy8
原网站

版权声明
本文为[javail]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202150336049799.html