Which versions of iOS and Android webviews already support ES6 modules?

烂漫一生 提交于 2019-12-07 13:24:28

问题


I've been wondering which os/webview versions already support ES6 modules (import/export feature) natively without having to transpile to ES5 via webpack/babel.

Please note that I'm asking about native webview support (for Cordova/PhoneGap) and not for mobile browser support such as Safari or Chrome.

I heard that iOS 10.3 does support it but I'm not sure, also I'm absolutely clueless regarding the current state on Android.

Couldn't find a clear answer googling around. Does someone have exact information on this or at least a link to a resource to read?


回答1:


From what I found out, the current state as of May 2017 is like this:


iOS

UIWebView: No support

WKWebView:

  • CORS error when served from file:///
  • 403 error when served via local http server plugin in Cordova
  • Serving from /external/ works

Android

No support in webview at all


Browsers are a bit better and catch up on support, see https://jakearchibald.com/2017/es-modules-in-browsers/



来源:https://stackoverflow.com/questions/43890272/which-versions-of-ios-and-android-webviews-already-support-es6-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!