Labs/Jetpack/API: Difference between revisions

From MozillaWiki
< Labs‎ | Jetpack
Jump to navigation Jump to search
(Created page with '= JetPack API Reference = JetPack is a project to explore new and innovative approaches to extensibility of the browser. === Logger === <source lang=cpp>#include <iostream> i...')
 
Line 4: Line 4:




=== Logger ===
'''Logger'''
 
Used to output debugging information, it appears in the Javascript Error Console. You can access it from the Tools menu.
<source lang=cpp>#include <iostream>
* <code>log( message )</code> or <code>log({message: string})</code>. Shows a log message in the Error Console.
int main ( int argc,  char **argv ) {
* <code>debug( message )</code> or <code>debug({message: string})</code>. Shows a debug message in the Error Console.
    std::cout << "Hello World!";
* <code>info( message )</code> or <code>info({message: string})</code>. Shows an info message in the Error Console.
    return 0;
* <code>warn( message )</code> or <code>warn({message: string})</code>. Shows a warning in the Error Console.
}</source>
* <code>error( message )</code> or <code>error({message: string})</code>. Shows an error message in the Error Console.

Revision as of 08:00, 27 April 2009

JetPack API Reference

JetPack is a project to explore new and innovative approaches to extensibility of the browser.


Logger Used to output debugging information, it appears in the Javascript Error Console. You can access it from the Tools menu.

  • log( message ) or log({message: string}). Shows a log message in the Error Console.
  • debug( message ) or debug({message: string}). Shows a debug message in the Error Console.
  • info( message ) or info({message: string}). Shows an info message in the Error Console.
  • warn( message ) or warn({message: string}). Shows a warning in the Error Console.
  • error( message ) or error({message: string}). Shows an error message in the Error Console.