repl.js

Summary
repl.js
bbop.widget.replA self-contained flexible REPL to use as a base to explore the BBOP environment that you setup.
Functions
replContructor for the bbop.widget.repl object.
get_idGet the id of different components in the REPL.
replace_buffer_textReplace the buffer text with new text.
advance_log_to_bottomCan’t be bothered to check now, but this needs to be done separately from the log because of an initial race condition.
destroyRemove the autocomplete and functionality from the DOM.

bbop.widget.repl

A self-contained flexible REPL to use as a base to explore the BBOP environment that you setup.

This is a completely self-contained UI and manager.

WARNING: This widget cannot display any kind of HTML tags in the log.

Summary
Functions
replContructor for the bbop.widget.repl object.
get_idGet the id of different components in the REPL.
replace_buffer_textReplace the buffer text with new text.
advance_log_to_bottomCan’t be bothered to check now, but this needs to be done separately from the log because of an initial race condition.
destroyRemove the autocomplete and functionality from the DOM.

Functions

repl

bbop.widget.repl = function(interface_id,
initial_commands,
in_argument_hash)

Contructor for the bbop.widget.repl object.

The in_argument_hash has the following options.

buffer_idthe id of the evaluation buffer textarea (default: null/random)
cli_idthe id of the CLI textarea (default: null/random)
display_initial_commands_p(default true)

If you do not specify ids for the inputs, random ones will be generated.

Arguments

interface_idstring id of the element to build on
initial_commandsa list of initial commands to feed the interpreter
in_argument_hash[optional] optional hash of optional arguments

Returns

this object

get_id

this.get_id = function(str)

Get the id of different components in the REPL.

Currently supported arguments are

  • ’buffer’

Arguments

strthe item you want to check

Returns

string or null

replace_buffer_text

this.replace_buffer_text = function(str)

Replace the buffer text with new text.

Arguments

strthe new text for the command buffer

Returns

n/a

advance_log_to_bottom

this.advance_log_to_bottom = function()

Can’t be bothered to check now, but this needs to be done separately from the log because of an initial race condition.

Arguments

n/a

Returns

n/a

destroy

this.destroy = function()

Remove the autocomplete and functionality from the DOM.

Arguments

n/a

Returns

n/a

bbop.widget.repl = function(interface_id,
initial_commands,
in_argument_hash)
Contructor for the bbop.widget.repl object.
this.get_id = function(str)
Get the id of different components in the REPL.
this.replace_buffer_text = function(str)
Replace the buffer text with new text.
this.advance_log_to_bottom = function()
Can’t be bothered to check now, but this needs to be done separately from the log because of an initial race condition.
this.destroy = function()
Remove the autocomplete and functionality from the DOM.
Close