Danny Yoo <firstname.lastname@example.org>
Source code can be found at:
a web browser. Furthermore, the library provides hooks to send string values
from that evaluation back into Racket.
As a simple example, evaluating the following:
should bring up a browser window in which an alert dialog should display.
sends values back and forth between the browser and Racket.
For more fine-grained control over evaluation, you can use js-evaluate
code should call the $SUCC
success function to send the value back
When this program executes, result
will be bound to an evaluated
stucture whose evaluate-value
will be 3628800
structure that records
how long the evaluation took, and on what browser the evaluation happened.
Each of the evaluation functions run in a isolated lexically scoped context. For example:
. The call to js-evaluate
function calls $SUCC
with a value.
In order to signal an exception back to Racket, use the implicit $FAIL
function. For example.
The return value for the evaluation functions in this libarary
are instances of the evaluated
value represents the value returned by a use of $SUCC.
t represents the amount of time in milliseconds that evaluation took.
browser represents the browser string.
The stdout field is currently underdocumented.
structure will be raised to the Racket caller.
2.2 Low-level API
the thunk should return a function that consumes three values, corresponding
to success, failure, and other parameters to evaluation.
defines an evaluator my-eval that will always give back
"ok" as the value of the evaluation.