Skip to content

Commit 41a19d6

Browse files
committed
Add docs
1 parent acf5df2 commit 41a19d6

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

content-scope-scripts/content-scope-scripts-api/src/main/java/com/duckduckgo/contentscopescripts/api/GlobalContentScopeJsMessageHandlersPlugin.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ interface GlobalContentScopeJsMessageHandlersPlugin {
3838
interface GlobalJsMessageHandler {
3939

4040
/**
41-
* Processes a global message.
41+
* Processes a global message received by the WebView.
42+
*
43+
* This method is responsible for handling a [JsMessage] and optionally
44+
* invoking a callback so consumers can also process the message if needed.
45+
*
46+
* @param jsMessage The JavaScript message to be processed.
47+
* @param jsMessageCallback An optional callback to handle the result of the message processing.
4248
*/
4349
fun process(
4450
jsMessage: JsMessage,

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ package com.duckduckgo.js.messaging.api
1818

1919
interface AdsjsMessageHandler {
2020
/**
21-
* This method processes a [JsMessage]
21+
* Processes a JavaScript message received by the WebView.
22+
*
23+
* This method is responsible for handling a [JsMessage] and optionally
24+
* invoking a callback so consumers can also process the message if needed.
25+
*
26+
* @param jsMessage The JavaScript message to be processed.
27+
* @param jsMessageCallback An optional callback to handle the result of the message processing.
2228
*/
2329
fun process(
2430
jsMessage: JsMessage,

0 commit comments

Comments
 (0)