JavaScriptConsoleCallback


interface JavaScriptConsoleCallback


Can be associated with an isolate to receive and process console messages and events from it.

Summary

Nested types

Representation of a console message, such as produced by console.log.

Public functions

Unit

Called when the console should notionally be cleared, such as through console.clear().

Unit

Called when a console message is produced by the isolate, such as through console.log().

Public functions

onConsoleClear

Added in 1.0.0-beta01
fun onConsoleClear(): Unit

Called when the console should notionally be cleared, such as through console.clear().

The default implementation does nothing.

onConsoleMessage

Added in 1.0.0-beta01
fun onConsoleMessage(message: JavaScriptConsoleCallback.ConsoleMessage): Unit

Called when a console message is produced by the isolate, such as through console.log().

Do not rely on console messages for the transfer of large volumes of data. Overly large messages, stack traces, or source identifiers may be truncated.