WkWebKit - javascript on loaded page finds window.webkit is undefined

后端 未结 4 1873
别跟我提以往
别跟我提以往 2020-12-31 06:46

I\'m experimenting with WkWebKit talking back and forth between app and page. I can get javaScript to execute fine using WkWebView evaluateJavascript method, but when I try

4条回答
  •  清歌不尽
    2020-12-31 07:07

    The window.webkit namespace only appears in webview with script message handlers. Make sure that you have called addScriptMessageHandler method of WKUserContentController.

提交回复
热议问题