# alternera_plugin_javascript v0.9.1 - API Reference

## Modules

- [Alternera.Plugins.Javascript](Alternera.Plugins.Javascript.md): The JavaScript step: a script written as the body of a function, run on
the request or the response in a fresh WebAssembly instance per call.
What it returns goes where its To rows say, as Script's returned value
does.
- [Alternera.Plugins.Javascript.Application](Alternera.Plugins.Javascript.Application.md): Compiles the JavaScript module once when the package starts
(`PluginWasmFramework.Modules.load/2`): compiling the interpreter takes a
few hundred milliseconds, which would otherwise fall on the first step
that runs. A module that fails to compile is logged there and fails each
step that runs it; the application starts regardless, so the rest of the
proxy does.
- [Alternera.Plugins.Javascript.Editor](Alternera.Plugins.Javascript.Editor.md): The JavaScript step's editor: the framework's
`PluginWasmFramework.StepEditor` over `Javascript.language/0`, and the
Help it shows. The colouring is registered by `Javascript.EditorMode`.

- [Alternera.Plugins.Javascript.EditorMode](Alternera.Plugins.Javascript.EditorMode.md): The JavaScript step's colouring in the proxy's code editor: a colocated
hook whose module code registers the language `"javascript"` with the
editor when app.js loads (`window.AlterneraEditorModes`, read by
the proxy's `assets/js/lua_editor/registered_modes.js`). The hook itself
does nothing and no element uses it.

