Add a command to the command history.
True if successful
Clear the entire command history.
Returns a copy of the entire command history.
Remove a single item from the command history.
The index of the command to remove. If empty, the last command will be removed.
True if removal was successful.
Sets a completely new command history.
An array of strings that becomes the new command history.
Registers a new input filter.
The input filter to register
Returns a function that can be called to remove the filter.
Registers a new input filter.
Returns a function that can be called to remove the filter.
Runs input through all input filters.
The original input
Associated input meta
Clear the command queue.
Clear the keypress queue.
Manually hide the prompt. It won't be shown until unhide() is called.
Hook into Haven's input listeners.
Add a command to the command queue. If the line input is ready, execute the command immediately.
Command to add
If true, the command isn't shown on the screen. The result of the command will still print normally.
Add a keypress to the command queue. If the engine is waiting for a keypress, send it immediately.
A one-character string containing the pressed character
Removes a filter from registered input filters.
The filter to remove
Returns true if the filter was removed, false if the filter wasn't registered.
Set the prefix of the command prompt. The prefix is usually a greater-than character (>) at the start of the command prompt.
The currently active command prompt is changed, and the new prefix is used for all future command prompts until changed again.
Note that calling this function directly with JavaScript changes the prompt in the interpreter, but doesn't pass the information to the story file. Therefore checking what the prefix is in the Inform story might not return correct values because the variable that the story uses to track the prefix content hasn't been changed. In most cases it's recommended to use the Vorple extensions/libraries in Inform to change the prefix.
The new prefix
If true, the prefix is inserted into the DOM as HTML. Otherwise HTML is escaped and shown as-is.
Returns the new prefix.
Set the lineinput's value.
The new value
Trigger the submit event of the lineinput.
The command to send, if null or left out the lineinput field's current value is used.
If true, the command isn't shown on the screen. The result of the command will still print normally.
Remove manual hiding of the prompt. It's called rather clumsily "unhide" instead of "show" to stress that it only undoes what the hide method did, and it doesn't force the prompt to appear if it has been hidden or removed by some other means.
Generated using TypeDoc
Haven's history API.