chromote
chromote copied to clipboard
Add top level `$eval(script=)` helper method to Chromote Session
$eval()
alters the default behavior to have
-
awaitPromise = TRUE
: Wait for returned Promise object to resolve. -
returnByValue = TRUE
: Return serialized values, not the pointer to the execution.
Questions:
- [ ] Should
arguments
be added? If so, this would require wrappingscript
inpaste0("(function() { ", script, " }).apply(null, ", args_serialized, ");")
which would have different scoping andreturn x;
behavior. - [ ] Should code be wrapped in
{
to scopelet
/const
variables?