Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Console

The Console object is used to interact with the script output window.

Hierarchy

  • Console

Index

Properties

Static err

A PrintWriter that can be used to write to the console's error stream.

Static out

A PrintWriter that can be used to write to the console's output stream.

Static visible

visible: boolean

Gets or sets whether the script console window is visible. The window automatically becomes visible when printed to.

Methods

Static clear

  • clear(): void
  • Clears the script console.

    Returns void

Static flush

  • flush(): void
  • Flushes pending writes to the script console. If output is being buffered due to a previous call to queue(), buffering ends and any pending output is sent to the console.

    Returns void

Static history

  • history(): string
  • Returns the current text of the console as a string.

    Returns string

Static print

  • print(...obj: any[]): void
  • Prints an object to the script console. This is identical to the global print function.

    Parameters

    • Rest ...obj: any[]

      the object to print

    Returns void

Static printComponent

  • Prints a user interface component to the script console.

    Parameters

    Returns void

Static printHTML

  • printHTML(html: string): void
  • Prints a string formatted with basic HTML markup to the console. For example, the string "something <i>special</i>" is printed with the word special displayed in an italic style.

    Parameters

    • html: string

      a string of simple HTML markup to be parsed, formatted, and inserted

    Returns void

Static printImage

Static printf

  • printf(formatString: string, ...value: any[]): void
  • Prints a formatted string to the script console. This is identical to the global printf function.

    Parameters

    • formatString: string

      the format string

    • Rest ...value: any[]

    Returns void

Static println

  • println(...obj: any[]): void
  • Prints an object to the script console, then starts a new line. This is identical to the global println function.

    Parameters

    • Rest ...obj: any[]

      the object to print

    Returns void

Static queue

  • queue(): void
  • Buffers output sent to the console until flush() is called.

    Returns void