Comments (2)
If want to be compatible with WebViewJavascriptBridge For Android, the users should modify the setupWebViewJavascriptBridge
to :
function setupWebViewJavascriptBridge(callback) {
var bridge=window.WebViewJavascriptBridge||window.WKWebViewJavascriptBridge
if (bridge) { return callback(bridge); }
var callbacks=window.WVJBCallbacks||window.WKWVJBCallbacks
if (callbacks) { return callbacks.push(callback); }
window.WVJBCallbacks=window.WKWVJBCallbacks = [callback];
if(window.WKWebViewJavascriptBridge){
window.webkit.messageHandlers.iOS_Native_InjectJavascript.postMessage(null)
}
}
The code above can still run right on Android.
from wkwebviewjavascriptbridge.
Hi~ @wendux
Good Job!
Emmmmm... But this framework has made some changes.
For example, do not rely on intercept requests for messaging.
So... For the Javascript code, there are also some minor changes.
from wkwebviewjavascriptbridge.
Related Issues (20)
- Add Package.swift to allow Swift Package Manager integration HOT 2
- Callback for microphone or camera permission?
- 集成这个库前端需要做哪些? HOT 1
- NoHandlerException, No handler for message from JS HOT 1
- 注入的js是否可以和 WebViewJavascriptBridge_JS 一样? HOT 1
- Carthage build error HOT 1
- WKWebViewJavascriptBridge: WARNING: no handler for message from iOS HOT 2
- 数据类型都支持哪些?? Data支持吗? HOT 1
- 请问JS调用原生方法后,可以多次callBack回调给JS吗? HOT 8
- iOS15 did not call back HOT 1
- Support Swift Package Manager integration
- OC版本里的setWebDelegate没有 HOT 1
- Bridge error with no callback responseID HOT 1
- I have redesigned new libraries, It only takes ten minutes to complete . Maybe can help you.
- 我已经重新设计了新的交互库,10分钟就能完成接入,也许可以帮助你. HOT 1
- 某些时候频繁快速重复传值给JS会失败,JS那边收不到数据导致界面空白 HOT 7
- I have trouble, access tab in webView,
- Add a git tag to simplify SPM integration process HOT 1
- Xcode15 Support
- 请问有Uniapp的demo么?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wkwebviewjavascriptbridge.