Console

@JSGlobal("console.Console") @native @JSType class Console extends StObject with Console_
trait Console_
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

def this(stdout: WritableStream)
def this(stdout: WritableStream, stderr: WritableStream)
def this(stdout: WritableStream, stderr: WritableStream, ignoreErrors: Boolean)
def this(stdout: WritableStream, stderr: Unit, ignoreErrors: Boolean)

Inherited methods

def assert(value: Any, message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def assert(value: Any, message: String, optionalParams: Any*): Unit

A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message.

A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message.

Inherited from
Console_
def clear(): Unit

When stdout is a TTY, calling console.clear() will attempt to clear the TTY. When stdout is not a TTY, this method does nothing.

When stdout is a TTY, calling console.clear() will attempt to clear the TTY. When stdout is not a TTY, this method does nothing.

Inherited from
Console_
def count(label: String): Unit
Inherited from
Console_
def count(): Unit

Maintains an internal counter specific to label and outputs to stdout the number of times console.count() has been called with the given label.

Maintains an internal counter specific to label and outputs to stdout the number of times console.count() has been called with the given label.

Inherited from
Console_
def countReset(label: String): Unit
Inherited from
Console_
def countReset(): Unit

Resets the internal counter specific to label.

Resets the internal counter specific to label.

Inherited from
Console_
def debug(message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def debug(message: Any, optionalParams: Any*): Unit

The console.debug() function is an alias for [[console.log]].

The console.debug() function is an alias for [[console.log]].

Inherited from
Console_
def dir(obj: Any, options: InspectOptions): Unit
Inherited from
Console_
def dir(obj: Any): Unit

Uses [[util.inspect]] on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj.

Uses [[util.inspect]] on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj.

Inherited from
Console_
def dirxml(data: Any*): Unit

This method calls [[console.log]] passing it the arguments received. Please note that this method does not produce any XML formatting

This method calls [[console.log]] passing it the arguments received. Please note that this method does not produce any XML formatting

Inherited from
Console_
def error(message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def error(message: Any, optionalParams: Any*): Unit

Prints to stderr with newline.

Prints to stderr with newline.

Inherited from
Console_
def group(label: Any*): Unit

Increases indentation of subsequent lines by two spaces. If one or more labels are provided, those are printed first without the additional indentation.

Increases indentation of subsequent lines by two spaces. If one or more labels are provided, those are printed first without the additional indentation.

Inherited from
Console_
def groupCollapsed(label: Any*): Unit

The console.groupCollapsed() function is an alias for [[console.group]].

The console.groupCollapsed() function is an alias for [[console.group]].

Inherited from
Console_
def groupEnd(): Unit

Decreases indentation of subsequent lines by two spaces.

Decreases indentation of subsequent lines by two spaces.

Inherited from
Console_
def hasOwnProperty(v: String): Boolean
Inherited from
Object
def info(message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def info(message: Any, optionalParams: Any*): Unit

The [[console.info]] function is an alias for [[console.log]].

The [[console.info]] function is an alias for [[console.log]].

Inherited from
Console_
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def log(message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def log(message: Any, optionalParams: Any*): Unit

Prints to stdout with newline.

Prints to stdout with newline.

Inherited from
Console_
def profile(label: String): Unit
Inherited from
Console_
def profile(): Unit

This method does not display anything unless used in the inspector. Starts a JavaScript CPU profile with an optional label.

This method does not display anything unless used in the inspector. Starts a JavaScript CPU profile with an optional label.

Inherited from
Console_
def profileEnd(label: String): Unit
Inherited from
Console_
def profileEnd(): Unit

This method does not display anything unless used in the inspector. Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.

This method does not display anything unless used in the inspector. Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.

Inherited from
Console_
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def table(tabularData: Any, properties: Array[String]): Unit
Inherited from
Console_
def table(tabularData: Any): Unit

This method does not display anything unless used in the inspector. Prints to stdout the array array formatted as a table.

This method does not display anything unless used in the inspector. Prints to stdout the array array formatted as a table.

Inherited from
Console_
def time(label: String): Unit
Inherited from
Console_
def time(): Unit

Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique label.

Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique label.

Inherited from
Console_
def timeEnd(label: String): Unit
Inherited from
Console_
def timeEnd(): Unit

Stops a timer that was previously started by calling [[console.time]] and prints the result to stdout.

Stops a timer that was previously started by calling [[console.time]] and prints the result to stdout.

Inherited from
Console_
def timeLog(label: Unit, data: Any*): Unit
Inherited from
Console_
def timeLog(label: String, data: Any*): Unit

For a timer that was previously started by calling [[console.time]], prints the elapsed time and other data arguments to stdout.

For a timer that was previously started by calling [[console.time]], prints the elapsed time and other data arguments to stdout.

Inherited from
Console_
def timeStamp(label: String): Unit
Inherited from
Console_
def timeStamp(): Unit

This method does not display anything unless used in the inspector. Adds an event with the label label to the Timeline panel of the inspector.

This method does not display anything unless used in the inspector. Adds an event with the label label to the Timeline panel of the inspector.

Inherited from
Console_
def toLocaleString(): String
Inherited from
Object
def trace(message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def trace(message: Any, optionalParams: Any*): Unit

Prints to stderr the string 'Trace :', followed by the [[util.format]] formatted message and stack trace to the current position in the code.

Prints to stderr the string 'Trace :', followed by the [[util.format]] formatted message and stack trace to the current position in the code.

Inherited from
Console_
def valueOf(): Any
Inherited from
Object
def warn(message: Unit, optionalParams: Any*): Unit
Inherited from
Console_
def warn(message: Any, optionalParams: Any*): Unit

The [[console.warn]] function is an alias for [[console.error]].

The [[console.warn]] function is an alias for [[console.error]].

Inherited from
Console_

Inherited fields