callJsFunctionWithResult

suspend fun callJsFunctionWithResult(jsBody: String, vararg args: JsonElement): JsonElement(source)

Calls a JavaScript function that can return a value, note that to do this jsBody MUST end with a return statement, eg:

val result = callJsFunctionWithResult("return 1 + 1")