try
if (window.console) {
console.log(...);
}
dennis.
mtest wrote:
Hello all :)
If it possible to define Firebug? Install it or not? Like it possible
do whis browsers by command:
if ($.browser.safari) {
alert(this is safari!);
}
maybe like this :))
if ($.extensions.firebug) {
I frequently do something like:
if(typeof window.console == 'undefined') window.console = { log: function()
{} };
So I can just use console.log() at will since if Firebug (or alternative) is
not present, it will just do nothing when called.
You can also extend that to do some kind of alternate
Also, if it's really Firebug that you're after, and not just the
console, you could do this:
if (window.console console.firebug) {
console.log(Firebug is installed);
}
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 14, 2008, at
3 matches
Mail list logo