iOS-WKWebViewBridgeExample-Swift icon indicating copy to clipboard operation
iOS-WKWebViewBridgeExample-Swift copied to clipboard

How can i evaluate something that is async?

Open jimmywarting opened this issue 8 years ago • 0 comments

for example a promise

    let code = "Promise.resolve({msg: 'hello world'})"
    let js = "Promise.resolve(" + code + ").then(data => webkit.messageHandlers.bridge.postMessage({i: " + i + ", data}))"

    webview.evaluateJavaScript(js)

jimmywarting avatar Mar 30 '17 07:03 jimmywarting