Android's addJavascriptInterface equivalent in iOS

前端 未结 2 1335
隐瞒了意图╮
隐瞒了意图╮ 2021-02-07 10:33

As you may know, Android\'s WebView has a method named addJavascriptInterface() which imports an Android JAVA object to Javascript context.

the question is,

2条回答
  •  情歌与酒
    2021-02-07 10:54

    I know this question is really old, but it seems that there is a better way to do it now with a WKWebView. See this answer: https://stackoverflow.com/a/37373745/1417922

提交回复
热议问题