Interface IEvaluateJavaScriptCallback
interface IEvaluateJavaScriptCallback
Extends com.amazon.apmf.IStandard
This callback interface would be invoked when [IHeadlessWebRuntime#evaluateJavaScript] API execution
is completed and the result is available to share with clients.
Methods
onResult()
This callback is invoked when the results are ready, after invoking [evaluateJavaScript][IHeadlessWebRuntime#evaluateJavaScript] API.voidonResult(string?result)
Parameters
result
string? — Optional
The string value returned from the JavaScript execution.
If the execution fails, or invokes a JavaScript function that does not return
a value (void), the result will be null.
When using [IHeadlessWebRuntime#evaluateJavaScript], it is recommended to always
ensure the JavaScript function returns a valid response.

