Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

注入的js是否可以和 WebViewJavascriptBridge_JS 一样? #27

Closed
ZD-Yin opened this issue May 21, 2020 · 1 comment
Closed

注入的js是否可以和 WebViewJavascriptBridge_JS 一样? #27

ZD-Yin opened this issue May 21, 2020 · 1 comment

Comments

@ZD-Yin
Copy link

ZD-Yin commented May 21, 2020

WKWebViewJavascriptBridgeJS 注入的 js 是否可以和 WebViewJavascriptBridgeJS 一样 , swift 代码这边去兼容就好,原来安卓 和 H5那边不用修改?

@ZD-Yin ZD-Yin changed the title js 注入是否可以和 WebViewJavascriptBridgeJS一样? 注入的js是否可以和 WebViewJavascriptBridge_JS 一样? May 21, 2020
@Lision
Copy link
Owner

Lision commented May 21, 2020

H5 似乎不可避免的需要做改动,因为这个库是依赖 WKWebView 的 messageHandlers 做的:

window.webkit.messageHandlers.iOS_Native_InjectJavascript.postMessage(null)

详细可以点这里

@Lision Lision closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants