Home Reference Source
public class | source

ConsoleClass

You can directly use instance of this class. Console

Class used to modify the Console

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Stores all of the callbacks

public

con: *

Stores the console div

public

input: *

Stores the input textbox

Method Summary

Public Methods
public

addcallback(id: string, callback: function)

Adds callbacks that are called whem something is entered into the console

public

callcallbacks(args: *)

Calls all callbacks with a variable amount of arguments

public

Makes the text appropiate for printing

public

enter()

Called when enter is hit from the console input

public

Gets the current input

public

print(text: string, breakline: boolean)

Prints text to the Console.

public

Removes a callback

Public Constructors

public constructor source

Public Members

public callbacks: * source

Stores all of the callbacks

public con: * source

Stores the console div

public input: * source

Stores the input textbox

Public Methods

public addcallback(id: string, callback: function) source

Adds callbacks that are called whem something is entered into the console

Params:

NameTypeAttributeDescription
id string
callback function

public callcallbacks(args: *) source

Calls all callbacks with a variable amount of arguments

Params:

NameTypeAttributeDescription
args *

public consolify(text: string): string source

Makes the text appropiate for printing

Params:

NameTypeAttributeDescription
text string

Return:

string

text

public enter() source

Called when enter is hit from the console input

public getinput(): string source

Gets the current input

Return:

string

input

public print(text: string, breakline: boolean) source

Prints text to the Console. Second argument is optional.

Params:

NameTypeAttributeDescription
text string
breakline boolean

public removecallback(id: string) source

Removes a callback

Params:

NameTypeAttributeDescription
id string