IE9 Developer Tools - Is it Magic?

I’m using IE9. I go to my webpage that I have a youtube jquery plugin installed and am using to load youtube videos into a player.

The bizarre thing that i am encountering is when i open the browser (IE9), the player doesnt work, meaning when i click a thumbnail it doesnt load and play the player like all of the browsers do.

The tricky thing I’m seeing is that when i open IE9 and then open the developer tools by pressing F12, magically everything begins to work.

My questions is what exactly happens you open the developer tools in IE9? How does it change the browser and how can i force this change on page load?

Microsoft would fix it in future versions of IE. Of course the IF statement is a nice workaround. Thanks for that!

The reason for this is that the ‘console’ object is not set when the console is not open yet, so it will fail on calling a method on an object that is ‘undefined’ :slight_smile:

Instead of deleting all “console.log”, it could be an option to add a simple “if”, so that it doesn´t break explorer but still works in FF.


if (window.console) {
    console.log('message');
}

This is good to know! It’s never happened to me, but it could save me a lot of time trying to debug.

Is the web page a file on your computer or is it on the web?

It is on the web and this only happens in IE.

The plugin i am using is: jQuery YouTube TubePlayer Plugin - By Nirvana Tikku

Stangely, i don’t see the same issue on his website, but i am using in a bit of a different way. Something is block my onClicks perhaps.

One thing i’ll try is moving his commands from onclick to the href.

Has the javascript got console.log() in it? This causes the javascript to not work unless your console is open!

no way, r u serious?

omg!!! i have been pulling my hair over this issue – that is sooooo freakin whack! But thank you for pointing it out to me. removing the console.log lines in it makes it magically work.