WeChat Mini Programs run on three ports: iOS, Android, and the developer tools used for debugging.
The script execution environments and environments used to render non-native components are different for each of the three ports:
Although the environments of the three ports are very similar, they do have a few differences:
ES6syntax support is inconsistent. Developers can prevent this by enabling
ES6functions that have been converted to
wxssrendering presentation is inconsistent. Although most problems can be avoided by enabling style completion Details, it is still recommended that developers check the Mini Program's actual presentation in iOS and Android.
Client trusted domain name verification
In scenarios where developers use a phone for QR code scanning debugging, after debug mode is opened, the latest client version will not check trusted domain names.
Code files must be encoded in UTF8
iOS only supports the UTF8 encoding format. The latest versions of developer tools will perform an encoding format verification on code files when code is uploaded.
ES6 API support status
WeChat Mini Programs already support the vast majority of ES6 APIs, the specific table is shown below:
tip: TBS 3.0 refers to the Android run environment for WeChat Mini Programs.
Array.valuesis not supported.
Proxyis not supported.