javascript - finding out if console is available -


i wondering, how can find out javascript if console object available?

i have problem if forget remove debug output console.log('sthg') errors in several browsers, if there no firebug, or similar, active.

thanks help

next problem interested in informations console object. has documentation link, or so? standard? , on...

check property exists member of window:

if (window.console) { } 

next problem interested in informations console object. has documentation link, or so? standard? , on...

check out firebug documentation console api; chrome , safari implement most, not all, of methods listed there. there's no standard defining should in console, you'll need test each browser see if supports feature.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -