A singleton class that implements a simple console.

Constructors

Properties

buffer: string = ''

Buffer for pre-initialized content.

consoleName: string = 'Console'

Specifies the name of the console window.

'Console'
DEBUG: boolean = true

Specifies if the output for debug should be visible in the console.

true
td: HTMLTableCellElement
textarea: null | HTMLTextAreaElement = null
TRACE: boolean = false

Specified if the output for enter and leave should be visible in the console.

false
WARN: boolean = true

Specifies if the output for warn should be visible in the console.

true
window: MaxWindow

Methods

  • Adds all arguments to the console if DEBUG is enabled.

    Parameters

    • Rest...args: string[]

    Returns void

  • Writes the specified string to the console if TRACE is true and returns the current time in milliseconds.

    Parameters

    • string: string

    Returns undefined | number

  • Writes the current navigator information to the console.

    Returns void

  • 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

  • Returns true if the console is visible.

    Returns boolean

  • 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

    enter for an example.

  • Shows or hides the console.

    Parameters

    • visible: boolean

    Returns void

  • Adds all arguments to the console if TRACE is enabled.

    Parameters

    • Rest...args: string[]

    Returns void

  • Adds all arguments to the console if WARN is enabled.

    Parameters

    • Rest...args: string[]

    Returns void

  • Adds the specified strings to the console.

    Parameters

    • Rest...args: string[]

    Returns void

  • Adds the specified strings to the console, appending a linefeed at the end of each string.

    Parameters

    • Rest...args: string[]

    Returns void