我有一个应用大量使用 webview。我的要求是能够查看 html 并将 javascript 注入(inject)正在加载的页面,甚至是 iframe。我已经使用 android 附带的 webview 完成了这项工作,但效果并不好。
那么还有其他项目可以提供相同的 html5 浏览体验但对开发人员更友好吗?是否有可能采用开源 Web View 代码并构建我自己的代码,或者这只是一个疯狂的想法?
谢谢。
最佳答案
看看Crosswalk . 如其网站所述:
With the platform variations in the market you are forced to assume that every Android WebView works differently. There are differences in:
- Which JavaScript APIs are available
- Support and syntax for CSS properties
- How your application's interface is rendered …and plenty
more. You want to support as many versions of Android as possible, but it’s frustrating and time consuming.
There’s a better way. What if the only WebView you had to worry about was up to date with the latest version of Google Chromium? With Crosswalk, you can:
- Develop around device fragmentation
- Provide a feature rich experience on all Android 4.x devices
- Easily debug with Chrome DevTools Improve the performance of your HTML, CSS, and JavaScript
关于android - 有没有 webview 的替代品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22459735/