Friday, December 2nd, 2005
Firefox 1.5: JavaScript Console Highjacking
<p>I noticed that my JavaScript console started to spew out CSS errors in 1.5 land:Then I saw information about Console2 which gives you just JavaScript errors, and lets the CSS ones go by.
Having access to CSS errors is great, but it would be nice to be able to toggle exactly what we want to see.
Related Content:












Good find. I personally like to be able to click “clear” in the normal version to quickly wipe the slate clean before I refresh, but I suppose one extra click is worth the much-needed extra functionality.
The new console in 1.5 is really a bad piece of work. Not only does it spew out errors about everything, they’ve also increased the pickyness of FireFox on accepting files – I found a logged message in the console saying that PHPMyAdmin’s CSS was being altogether rejected because it didn’t have the correct mime type. (it’s generated from a .php file and there’s no header() function useage in there). Sloppy work on PHPMyAdmin’s end but honestly – FireFox needs to be more flexible than this.
If you fix your CSS errors, you won’t have to see them. But it is rather obnoxious to see them when working on some one else’s web site and seeing all the CSS errors.
Heck, I do some work with a customer that uses Sputnik (wifi system) and they have 100′s of CSS and javascript errors. Makes the console useless for debugging anything.
Rendering pages with errors was a mistake in the first page.
Yes,
All I would want is an area with checkboxes for:
[ ] CSS
[ ] JavaScript
[ ] … other errors!
And they may want to rename it from “JavaScript Console” :)
Cheers,
Dion
Filtering and naming options are mentioned in this bug (including checkboxes, etc.)
http://bugzilla.mozilla.org/show_bug.cgi?id=275265
Yeah, who uses those attributes, anyway? ‘layer-background-color’, ‘filter’? This is all proprietary IE stuff. Bad.
Absolutely true. the css error taking too many error lines. need filter
Improper CSS can cause js errors. I’m not saying it’s easy, but it’s quite possible. However I do understand the need for filters, though. But, I’d like to ask that instead of loading the IE stuff in firefox by just throwing it all in the same CSS, to use the if ie < 9 (it will be forever before they use css properly) tag to load a secondary ie.css file. This would save bandwidth for your site (since those not using IE wouldn’t need to load extra crap) and would prevent other browsers from choking on your proprietary code.
Meh. You won’t take the advice anyway :(
This is great news, as I have a project at work, where we use Microsoft Sharepoint (with two standard Sharepoint CSS files). These files have lots of CSS errors, which makes it sometimes hard to find the JavaScript errors.
First off, I’m glad I stumbled in to this site. Great resource.
I totally agree a filter is needed, but I also am glad it shows CSS errors too.
The problem is, there is a vast ocean of garbage code out there that is mostly a result of the bad old days of HTML, where Netscape and IE allowed malformed markup. No one ( esp. Microsoft ) is willing to stand up and refuse to render shit pages because then that browser gets tarred as “broken” as it will not “work” properly.
One hopes that with the emergence of AJAX, SVG, and XHTML it’ll change, but then again, the shambling corpse of IE will be haunting us for many years to come.
I had the same concern a month ago, in using the 1.5 betas, but first found another useful hack for doing error message grepping conveniently (prior to finding Console² [http://ecmanaut.blogspot.com/2005/10/console-better-still-mozilla-error.html]) — Console Filter! [http://ecmanaut.blogspot.com/2005/10/relief-from-noisy-mozilla-15-console.html] These two extensions together seriously pack a punch.
btw, for David up there, ‘layer-background-color’ is actually a NN4 attribute, and not an IE one. Sometimes it would be nice if everyone didn’t jump all over the “I hate M$” bandwagon…they *are* the ones that created XmlHttpRequest, after all.
Why still call it the JavaScript console if it’s going to spew out all the CSS and XUL errors caused by bad webpages and faulty extensions? I’d love the ability to turn on/off which errors I see because it’s annoying to see half-a-bazillion css errors when I’m watching for a javascript error. Oh well.. just my 2 cents.
I’ve reported this as a bug – https://bugzilla.mozilla.org/show_bug.cgi?id=323494
Fill your bowl to the brim and it will spill.
Keep sharpening your knife and it will blunt.
Chase after money and security and your heart will never unclench.
Care about other people’s approval and you will be their prisoner.
Do your work, then step back. The only path to serenity.