I'm working on a new project which has some complex javascript. I can't post any code so that's not what my question is about.
I have a script which works in Firefox 3.0
. It was pointed out that the script did not work in Firefox 3.5
, so I'm trying to make it work. Indeed the script didn't produce the expected results, so I installed the latest version of Firebug
, enabled the console
and refreshed the page.
And wow, it worked.
No errors, warnings nothing.
So I disabled the console, and then it didn't work anymore...
What's going on here? The Firebug console somehow changes something in Firefox that makes my script work? Any advice on what next? (besides asking future visitors to install Firebug...)
Could it be something as simple as forgetting to comment a call to console.log()
somewhere in your javascript?
If you have hanging references, and the user doesn't have Firebug installed, you're going to get a runtime error that will halt execution of the script.
It sounds to me like there's a chance you have a threading problem, and FireBug is analyzing and possibly slowing down one of the threads so that it has time to complete before the next step is resolved.
Are you possibly utilizing ajax, and something is waiting on that response? Or possibly you're doing something on or after the load of an object that is depending on something else in the DOM?
UPDATE: For those stumbling upon this now, "threads" in JavaScript really only exist in abstraction (web workers, etc). I was mis-using the term. I was really thinking of an asynchronous action that returned before another one was ready.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With