Labs/Jetpack/JEP/28: Difference between revisions

Jump to navigation Jump to search
→‎console: changed console methods and formatting a bit
(Renamed 'introduction' to 'abstract')
(→‎console: changed console methods and formatting a bit)
Line 73: Line 73:
<tt>console</tt> is an object with methods similar to Firebug's [http://getfirebug.com/console.html console] object:
<tt>console</tt> is an object with methods similar to Firebug's [http://getfirebug.com/console.html console] object:


<tt>console.'''log'''(''object''[[, ''object2''], ''...''])</tt>
<tt>console.'''log'''(''object''[, ''object'', ...])</tt>


Logs an informational message to the console. Depending on console's underlying implementation and user interface, you may be able to introspect into the properties of non-primitive objects that are logged.
Logs an informational message to the console. Depending on console's underlying implementation and user interface, you may be able to introspect into the properties of non-primitive objects that are logged.


<tt>console.'''warn'''(''object''[[, ''object2''], ''...''])</tt>
<tt>console.'''info'''(''object''[, ''object'', ...])</tt>
 
A synonym for <tt>console.log()</tt>.
 
<tt>console.'''warn'''(''object''[, ''object'', ...])</tt>


Logs a warning message to the console.
Logs a warning message to the console.


<tt>console.'''error'''(''object''[[, ''object2''], ''...''])</tt>
<tt>console.'''error'''(''object''[, ''object'', ...])</tt>


Logs an error message to the console.
Logs an error message to the console.


<tt>console.'''debug'''(''object''[[, ''object2''], ''...''])</tt>
<tt>console.'''debug'''(''object''[, ''object'', ...])</tt>


Logs a debug message to the console.
Logs a debug message to the console.
874

edits

Navigation menu