Skip to content

Commit 2a16166

Browse files
committed
Add docs
1 parent 9a4758f commit 2a16166

File tree

1 file changed

+13
-0
lines changed
  • js-messaging/js-messaging-api/src/main/java/com/duckduckgo/js/messaging/api

1 file changed

+13
-0
lines changed

js-messaging/js-messaging-api/src/main/java/com/duckduckgo/js/messaging/api/AdsjsMessaging.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ interface AdsjsMessaging {
5151
}
5252

5353
interface AdsjsJsMessageCallback {
54+
/**
55+
* Processes a JavaScript message received by the WebView.
56+
*
57+
* This method is responsible for handling a message with the given parameters
58+
* and invoking a callback to send a response back to the JavaScript code.
59+
*
60+
* @param featureName The name of the feature associated with the message.
61+
* @param method The method name of the message.
62+
* @param id An optional identifier for the message.
63+
* @param data An optional JSON object containing additional data for the message.
64+
* @param onResponse A callback function to send a response back to the JavaScript code.
65+
*/
5466
fun process(
5567
featureName: String,
5668
method: String,
@@ -69,6 +81,7 @@ interface AdsjsMessageHandler {
6981
*
7082
* @param jsMessage The JavaScript message to be processed.
7183
* @param jsMessageCallback An optional callback to handle the result of the message processing.
84+
* @param onResponse A callback function to send a response back to the JavaScript code.
7285
*/
7386
fun process(
7487
jsMessage: JsMessage,

0 commit comments

Comments
 (0)