Console class
The object provides access to the browser's
debugging console (e.g. the Web console in Firefox).
The specifics of how it works varies from browser to browser,
but there is a de facto
set of features that are typically provided.
The 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
. For example:
console.log("Failed to open the specified link")
This page documents the Methods available on the object and gives a few Usage examples.
Note: This feature is available in Web Workers
- Available extensions
- Annotations
-
- @JS('console')
- @staticInterop
Constructors
- Console()
-
factory
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
-
clear(
) → void -
Available on Console, provided by the PropsConsole extension
-
count(
[String? label = 'default']) → void -
Available on Console, provided by the PropsConsole extension
-
countReset(
[String? label = 'default']) → void -
Available on Console, provided by the PropsConsole extension
-
debug(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
dir(
[dynamic item, dynamic options]) → void -
Available on Console, provided by the PropsConsole extension
-
dirxml(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
error(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
group(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
groupCollapsed(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
groupEnd(
) → void -
Available on Console, provided by the PropsConsole extension
-
info(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
log(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
mAssert(
[bool? condition = false, dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
table(
[dynamic tabularData, Iterable< String> ? properties]) → void -
Available on Console, provided by the PropsConsole extension
-
time(
[String? label = 'default']) → void -
Available on Console, provided by the PropsConsole extension
-
timeEnd(
[String? label = 'default']) → void -
Available on Console, provided by the PropsConsole extension
-
timeLog(
[String? label = 'default', dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
toString(
) → String -
A string representation of this object.
inherited
-
trace(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
-
warn(
[dynamic data1, dynamic data2, dynamic data3]) → void -
Available on Console, provided by the PropsConsole extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited