console.h

Functions

voidemscripten_console_log(constchar*utf8String)

Prints a string using console.log().

Parameters:
  • utf8String – A string encoded as UTF-8.

voidemscripten_console_warn(constchar*utf8String)

Prints a string using console.warn().

Parameters:
  • utf8String – A string encoded as UTF-8.

voidemscripten_console_error(constchar*utf8String)

Prints a string using console.error().

Parameters:
  • utf8String – A string encoded as UTF-8.

voidemscripten_out(constchar*utf8String)

Prints a string using the out() JS function, which by default will write to the console (or stdout), but can be overridden by via the print attribute on the Module object.

Parameters:
  • utf8String – A string encoded as UTF-8.

voidemscripten_err(constchar*utf8String)

Prints a string using the err() JS function, which by default will write to the console (or stderr), but can be overridden by via the printErr attribute on the Module object.

Parameters:
  • utf8String – A string encoded as UTF-8.

voidemscripten_dbg(constchar*utf8String)

Prints the string using the dbg() JS function, which by will write to the console (or stdout). Just like the dbg() JS function this symbol is only available in debug builds (i.e. when linking with -sASSERTIONS or equivelently -O0).

Parameters:
  • utf8String – A string encoded as UTF-8.