admin管理员组文章数量:1277885
Im using Google Maps Javascript API V3, and recently the icons on my map aren't showing up in IE9.
To get to the bottom of it, I turned on IE's developer tools. When I refreshed the map, the icons appeared! However, when I close out of IE and start anew, the icons aren't there. Yet again, if I turn on the developer tools and refresh, the icons appear.
My question is the title of this topic, what is enabled when accessing IE's developer tools, which is allowing my icons on my Google map to appear??
Im using Google Maps Javascript API V3, and recently the icons on my map aren't showing up in IE9.
To get to the bottom of it, I turned on IE's developer tools. When I refreshed the map, the icons appeared! However, when I close out of IE and start anew, the icons aren't there. Yet again, if I turn on the developer tools and refresh, the icons appear.
My question is the title of this topic, what is enabled when accessing IE's developer tools, which is allowing my icons on my Google map to appear??
Share Improve this question edited Jan 2, 2014 at 21:58 Kara 6,22616 gold badges53 silver badges58 bronze badges asked May 2, 2012 at 14:13 JoshJosh 1,0194 gold badges17 silver badges32 bronze badges 2- Just out of curiosity, have you tried doing a refresh with the tools off? – dweiss Commented May 2, 2012 at 14:14
-
1
Does changing the
Browser Mode:
on the developer tools page make the buttons appear or disappear? – Brant Olsen Commented May 2, 2012 at 14:20
2 Answers
Reset to default 15If you have any console prints in your code, these would throw exceptions (hence breaking the javascript after it) if the page was loaded when the developer tools were closed.
to fix this, wrap your prints in an if statement:
if (console) {
console.log('...');
}
Any references to the global console
object will only work if the IE Developer Tools are open. If the developer tools are closed, the global console
object is undefined.
For example, the following code will only run if the developer tools are open. If they're closed, they'll throw an error about console being undefined:
console.log("test");
本文标签: javascriptDoes IE9 enable 39something39 when using developer toolsStack Overflow
版权声明:本文标题:javascript - Does IE9 enable 'something' when using developer tools? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741266805a2368629.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论