Josh.Readline

Josh.Readline is the underlying plumbing responsible for all keystroke handling, bringing GNU Readline like line editing to the browser. It is used by Josh.Shell to implement bash-like command prompt behavior, but could easily be wired up to any text box requiring advanced key handling. It has no dependencies on any outside libraries, although it does require either Josh.History and Josh.Killring or objects implementing the same calls.

Functions

When using Josh.Shell Readline is proxied for those calls that need to be exposed and otherwise invisible. The full API for readline is really only of interest for usage away from Josh.Shell.

new Josh.Readline(config)

isActive()

activate()

deactivate()

getLine

onActivate(eventHandler)

onDeactivate(eventHandler)

onChange(eventHandler)

onClear(eventHandler)

onEnter(eventHandler)

onCompletion(eventHandler)

onCancel(eventHandler)

onEOT(eventHandler)

onSearchStart(eventHandler)

onSearchEnd(eventHandler)

onSearchChange(eventHandler)

Internal Dependencies

Josh.History

Josh.Killring

External Dependencies

None