In WKWebView we can call ObjectiveC/swift code using webkit message handlers
eg: webkit.messageHandlers.<handler>.pushMessage(message)
It works well for simple javascript functions without parameters. But;
Is it possible to call native code with JS callback …
I tried to call a Javascript function from swift using below code but can't access the Javascript function
This is how I create the Javascript context object:
lazy var context: JSContext? = {
let context = JSContext()
guard let
JSPath = Bundle.main.path(…
I'm sending a value to javascript function and get a result. However, I'm getting "Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}" error when …