GeezerVison is showing maxgraph.github.io — MaxLog | @maxgraph/core
A singleton class that implements a simple console.
Constructors
Properties
Staticbuffer
buffer: string = ''
Buffer for pre-initialized content.
StaticconsoleName
consoleName: string = 'Console'
Specifies the name of the console window.
StaticDEBUG
DEBUG: boolean = true
Specifies if the output for debug should be visible in the console.
Statictd
td: HTMLTableCellElement
Statictextarea
textarea: HTMLTextAreaElement | null = null
StaticTRACE
TRACE: boolean = false
Specified if the output for enter and leave should be visible in the console.
StaticWARN
WARN: boolean = true
Specifies if the output for warn should be visible in the console.
Methods
StaticaddButton
-
Adds a button to the console using the given label and function.
Returns void
Staticdebug
-
debug(...args: string[]): void
Adds all arguments to the console if DEBUG is enabled.
Returns void
Staticenter
-
enter(string: string): number | undefined
Writes the specified string to the console if TRACE is true and returns the current time in milliseconds.
Returns number | undefined
Staticinfo
-
Writes the current navigator information to the console.
Returns void
Staticinit
-
Initializes the DOM node for the console.
This requires document.body to point to a non-null value.
This is called from within setVisible if the log has not yet been initialized.
Returns void
StaticisVisible
-
Returns true if the console is visible.
Returns boolean
Staticleave
-
leave(string: string, t0?: number): void
Writes the specified string to the console if TRACE is true and computes the difference between the current
time and t0 in milliseconds.
Parameters
- string: string
Optionalt0: number
Returns void
StaticsetVisible
-
setVisible(visible: boolean): void
Shows or hides the console.
Returns void
Statictrace
-
trace(...args: string[]): void
Adds all arguments to the console if TRACE is enabled.
Returns void
Staticwarn
-
warn(...args: string[]): void
Adds all arguments to the console if WARN is enabled.
Returns void
Staticwrite
-
write(...args: string[]): void
Adds the specified strings to the console.
Returns void
Staticwriteln
-
writeln(...args: string[]): void
Adds the specified strings to the console, appending a linefeed at the end of each string.
Returns void
On This Page
Constructors
Properties
Methods