views:

4058

answers:

3

WebKit/Safari supports the console object, which is similar to what Firebug does. But what exactly is supported? There is a console documentation for Firebug, but where can I find the console documentation for Safari/WebKit?

+18  A: 

Supported methods were originally:

  • console.log()
  • console.error()
  • console.warn()
  • console.info()

Newer versions of WebKit also add the following methods making the WebKit console API almost identical to Firebug's console API:

  • console.count()
  • console.debug()
  • console.profileEnd()
  • console.trace()
  • console.dir()
  • console.dirxml()
  • console.assert()
  • console.time()
  • console.profile()
  • console.timeEnd()
  • console.group()
  • console.groupEnd()

(New information based on the WebKit nightly build WebKit-SVN-r37126, at the time of writing these methods aren't available in Safari)

georgebrock
+9  A: 

The console API is documented by Apple in the Debugging Your Website section of the Safari Developer Guide.

Pullets Forever
A: 

Firebug's Console API documentation has moved here:

http://getfirebug.com/wiki/index.php/Console_API

robcee
I updated the URL in @georgebrock answer.
Alexandre Jasmin