Replies: 1 comment
-
|
I found out that I used the wrong usage. this doesn't trigger any callback but just a return value. result = await window.webkit.messageHandlers.NATIVECODE.postMessage("MessageFromJavascript"); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
using wpewebkit version 2.46.6
native side:
webkit_script_message_reply_return_value(reply, jsc_value_new_string(jsc_value_get_context(value), "Reply from native code"));
return false;
javascript side:
window.webkit.messageHandlers.NATIVECODE.postMessage(
"MessageFromJavascript",
(replyValue) => { console.log("MessageFromNative:", replyValue); //<<--- this one is not called
});
issue: javascript callback of the reply was not triggered or called.
Did I missed something?
Beta Was this translation helpful? Give feedback.
All reactions