ConsoleInstance

js.html.ConsoleInstance (extern interface)

The Console 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.

Documentation Console by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Instance Members

assert(?condition: Bool = false, data: haxe.extern.Rest): Void

Log a message and stack trace to console if the first argument is false.

Name Type Default
condition Bool false
data haxe.extern.Rest

clear(): Void

Clear the console.


count(?label: String = "default"): Void

Log the number of times this line has been called with the given label.

Name Type Default
label String "default"

countReset(?label: String = "default"): Void

Resets the value of the counter with the given label.

Name Type Default
label String "default"

debug(data: haxe.extern.Rest): Void

Outputs a message to the console with the log level "debug". Note: Starting with Chromium 58 this method only appears in Chromium browser consoles when level "Verbose" is selected.

Name Type
data haxe.extern.Rest

error(data: haxe.extern.Rest): Void

Outputs an error message. You may use string substitution and additional arguments with this method.

Name Type
data haxe.extern.Rest

info(data: haxe.extern.Rest): Void

Informative logging of information. You may use string substitution and additional arguments with this method.

Name Type
data haxe.extern.Rest

For general output of logging information. You may use string substitution and additional arguments with this method.

Name Type
data haxe.extern.Rest

table(data: haxe.extern.Rest): Void

Displays tabular data as a table.

Name Type
data haxe.extern.Rest

trace(data: haxe.extern.Rest): Void

Outputs a stack trace.

Name Type
data haxe.extern.Rest

warn(data: haxe.extern.Rest): Void

Outputs a warning message. You may use string substitution and additional arguments with this method.

Name Type
data haxe.extern.Rest

Displays an interactive listing of the properties of a specified JavaScript object. This listing lets you use disclosure triangles to examine the contents of child objects.

Name Type
data haxe.extern.Rest

dirxml(data: haxe.extern.Rest): Void

Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not possible.

Name Type
data haxe.extern.Rest

group(data: haxe.extern.Rest): Void

Creates a new inline group, indenting all following output by another level. To move back out a level, call groupEnd().

Name Type
data haxe.extern.Rest

groupCollapsed(data: haxe.extern.Rest): Void

Creates a new inline group, indenting all following output by another level. However, unlike group() this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call groupEnd().

Name Type
data haxe.extern.Rest

groupEnd(): Void

Exits the current inline group.


time(?label: String = "default"): Void

Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page.

Name Type Default
label String "default"

timeLog(?label: String = "default", data: haxe.extern.Rest): Void

Logs the value of the specified timer to the console.

Name Type Default
label String "default"
data haxe.extern.Rest

timeEnd(?label: String = "default"): Void

Stops the specified timer and logs the elapsed time in seconds since it started.

Name Type Default
label String "default"

exception(data: haxe.extern.Rest): Void

An alias for error().

Name Type
data haxe.extern.Rest

timeStamp(?data: Dynamic): Void

Adds a marker to the browser's Timeline or Waterfall tool.

Name Type Default
data Dynamic (optional)

profile(data: haxe.extern.Rest): Void

Starts the browser's built-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile.

Name Type
data haxe.extern.Rest

profileEnd(data: haxe.extern.Rest): Void

Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool).

Name Type
data haxe.extern.Rest