If result is NULL, it will be an oobSend (R process will continue);
otherwise the R process will wait for a response (oobMessage).
Value
A ts object that accepts 'JavaScript' functions as input. Using 'JavaScript' functions as output (R to 'JavaScript') is not supported yet.
Examples
# Fire-and-forget callback from 'JavaScript' (oobSend)
cb <- js_function(ts_character(1))
# Callback that returns a value to R (oobMessage)
ask <- js_function(ts_integer(1), result = ts_logical(1))