Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat gadget tool details point


May 20, 2021 WeChat Mini Program Development Document


Table of contents


javascript && wxss


WeChat applets run at three ends: iOS, Android, and developer tools for debugging.

The three-end script execution environment cluster and the environment used to render non-native components are different:

  • On iOS, the javascript code for the applet is run in JavaScriptCore and is rendered by WKWebView in environments such as iOS 8, iOS 9, and iOS 10
  • On Android, the javascript code for the gadget is parsed via X5 JSCore and rendered by X5 based on the Mobile Chrome 37 kernel
  • On the development tool, the javascript code for the gadget runs in nwjs and is rendered by Chrome Webview

Although the environment at the three ends is very similar, there are some differences:

  • ES6 support is inconsistent, and syntax developers can ES6 ES5 feature. Details

  • wxss performance is inconsistent, although you can avoid most of the problem details by turning on style complements, and developers are advised to check the true performance of small programs on iOS and Android.


Client trusted domain name verification


In a scenario where the developer uses the phone to scan the code for debugging, the latest version of the client will not check the trusted domain name after debugging mode is turned on.


The code file must be encoded by UTF8

Only UTF8 encoding formats are supported under iOS, and the latest version of the developer tool checks the code file once when uploading code.

ES6 API support

The WeChat applet has supported most of the ES6 API specific forms as follows:

  1. tip : TBS 3.0 refers to the WeChat applet Android running environment
  2. tip : Array.values not support
  3. tip : Proxy not support
String iOS8 iOS9 iOS10 TBS3.0
codePointAt
normalize
includes
startsWith
endsWith
repeat
String.fromCodePoint
Array iOS8 iOS9 iOS10 TBS3.0
copyWithin
find
findIndex
fill
entries
keys
values
includes
Array.from
Array.of
Number iOS8 iOS9 iOS10 TBS3.0
isFinite
isNaN
parseInt
parseFloat
isInteger
EPSILON
isSafeInteger
Math iOS8 iOS9 iOS10 TBS3.0
trunc
sign
cbrt
clz32
imul
fround
hypot
expm1
log1p
log10
log2
sinh
cosh
tanh
asinh
acosh
atanh
Object iOS8 iOS9 iOS10 TBS3.0
is
assign
getOwnPropertyDescriptor
keys
getOwnPropertyNames
getOwnPropertySymbols
Other iOS8 iOS9 iOS10 TBS3.0
Symbol
Set
Map
Proxy
Reflect
Promise