chromote icon indicating copy to clipboard operation
chromote copied to clipboard

Add top level `$eval(script=)` helper method to Chromote Session

Open schloerke opened this issue 3 years ago • 0 comments

$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 wrapping script in paste0("(function() { ", script, " }).apply(null, ", args_serialized, ");") which would have different scoping and return x; behavior.
  • [ ] Should code be wrapped in { to scope let/const variables?

schloerke avatar Jan 10 '22 16:01 schloerke