Skip to main content

Module script

Module script 

Source
Available on crate feature javascript only.
Expand description

The boa-backed Cascade — a document’s own scripts, run.

Behind the default-off javascript feature. A boa-backed Cascade: a document’s own scripts, run.

Behind the default-off javascript feature; with it off, boa_engine is not in the dependency tree at all.

A script reaches no I/O. Doc.submitForm, Doc.print, app.launchURL and the rest are transcript lines a host reads back through ScriptCascade::transcript, so a URL or a form’s bytes come back rather than going out; nothing opens a socket, a file or a process.

A script that exhausts a sandbox limit refuses rather than accepting. Limits bounds loops, recursion and stack depth; not heap or regex backtracking.

Re-exports§

pub use model::AnnotModel;
pub use model::DocumentModel;
pub use model::FieldModel;
pub use model::FieldModelFlags;
pub use model::FieldModelKind;
pub use transcript::TranscriptLine;

Modules§

model
What the host tells the realm about the document, and about its fields.
transcript
What a script asked the host to do, as data the host reads.
zone
The timezone the engine’s Date sees.

Structs§

BuildError
Building a realm failed, which only a broken engine build can cause.
FieldActions
The ten /AA entries a field can carry, as their JavaScript source.
ScriptCascade
A boa-backed Cascade.
ScriptConfig
What a scripting session is allowed to do, and what it sees.
ScriptFailure
One script that stopped, named and explained.

Enums§

ScriptStop
Why a script did not finish.

Constants§

GOLDEN_CLOCK_SECS
The instant the goldens were recorded at, in seconds since the epoch: what a conformance run must freeze its clock to.
GOLDEN_FILE_PATH
The file path the goldens were recorded with, which is the test harness’s own and not any real file’s.
GOLDEN_PRINTD_OFFSET_SECS
The offset util.printd applies when the goldens were recorded, which is not the one Date uses: a flat GMT-0800, with no daylight saving, whatever the date.
GOLDEN_TIMEZONE
The timezone the engine’s Date saw when the goldens were recorded: TZ=America/Los_Angeles, as V8 resolves it — which is GMT-0700 for the fixtures’ July dates and GMT-0800 for their December ones.