Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

void onResult(string? result)
This callback is invoked when the results are ready, after invoking [evaluateJavaScript][IHeadlessWebRuntime#evaluateJavaScript] API.

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.
Last modified on October 29, 2026