$Console extension type

The console object provides access to the debugging console (e.g., the Web console in Firefox).

Implementations of the console API may differ between runtimes. In particular, some console methods may work differently or not work at all in some online editors and IDEs. To see the behavior described in this documentation, try the methods in your browser's developer tools, although even here, there are some differences between browsers.

The console object can be accessed from any global object. Window on browsing scopes and WorkerGlobalScope as specific variants in workers via the property console. It's exposed as Window.console, and can be referenced as console. For example:

console.log("Failed to open the specified link");

This page documents the Methods available on the console object and gives a few Usage examples.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions
Annotations
  • @JS('console')

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

assert_(JSAny? data, [bool condition]) → void
clear() → void
count([String label]) → void
countReset([String label]) → void
debug(JSAny? data) → void
dir([JSAny? item, JSObject? options]) → void
dirxml(JSAny? data) → void
error(JSAny? data) → void
group(JSAny? data) → void
groupCollapsed(JSAny? data) → void
groupEnd() → void
info(JSAny? data) → void
log(JSAny? data) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
table([JSAny? tabularData, JSArray<JSString> properties]) → void
time([String label]) → void
timeEnd([String label]) → void
timeLog(JSAny? data, [String label]) → void
toString() String
A string representation of this object.
inherited
trace(JSAny? data) → void
warn(JSAny? data) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited