All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.scalajs.dom.html.browser.Console.scala Maven / Gradle / Ivy

There is a newer version: 0.4.2
Show newest version
package io.scalajs.dom.html.browser

import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal

/**
  * The console module provides a simple debugging console that is similar to the JavaScript console mechanism
  * provided by web browsers.
  *
  * The module exports two specific components:
  * 
    *
  • A Console class with methods such as console.log(), console.error() and console.warn() that can be used to * write to any Node.js stream.
  • *
  • A global console instance configured to write to stdout and stderr. Because this object is global, it can be * used without calling require('console').
  • *
* @author [email protected] */ @js.native @JSGlobal("Console") class Console extends js.Object { /** * Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and * all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). * @param data the given data arguments * @example console.error([data][, ...]) */ def error(data: js.Any, args: Any*): Unit = js.native /** * The console.info() function is an alias for console.log(). * @example console.info([data][, ...]) */ def info(data: js.Any, args: Any*): Unit = js.native /** * Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and * all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). * @param data the given data arguments * @example console.log([data][, ...]) */ def log(data: js.Any, args: Any*): Unit = js.native /** * Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and * all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). * @param data the given data arguments * @example console.log([data][, ...]) */ def warn(data: js.Any, args: Any*): Unit = js.native }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy