新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)小程序教程:微信小程序 JavaScript支持情況
JavaScript 支持情況
運(yùn)行限制
基于安全考慮,小程序中不支持動(dòng)態(tài)執(zhí)行 JS 代碼,即:

- 不支持使用 eval 執(zhí)行 JS 代碼
- 不支持使用 new Function 創(chuàng)建函數(shù)
客戶端 ES6 API 支持情況
微信小程序已經(jīng)支持了絕大部分的 ES6 API,已支持的 API 如下(部分API依賴系統(tǒng)版本):
| String | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| codePointAt | ||||
| normalize | ||||
| includes | ||||
| startsWith | ||||
| endsWith | ||||
| repeat | ||||
| String.fromCodePoint |
| Array | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| copyWithin | ||||
| find | ||||
| findIndex | ||||
| fill | ||||
| entries | ||||
| keys | ||||
| values | ||||
| includes | ||||
| Array.from | ||||
| Array.of |
| Number | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| isFinite | ||||
| isNaN | ||||
| parseInt | ||||
| parseFloat | ||||
| isInteger | ||||
| EPSILON | ||||
| isSafeInteger |
| Math | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| trunc | ||||
| sign | ||||
| cbrt | ||||
| clz32 | ||||
| imul | ||||
| fround | ||||
| hypot | ||||
| expm1 | ||||
| log1p | ||||
| log10 | ||||
| log2 | ||||
| sinh | ||||
| cosh | ||||
| tanh | ||||
| asinh | ||||
| acosh | ||||
| atanh |
| Object | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| is | ||||
| assign | ||||
| getOwnPropertyDescriptor | ||||
| keys | ||||
| getOwnPropertyNames | ||||
| getOwnPropertySymbols |
| Other | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| Symbol | ||||
| Set | ||||
| Map | ||||
| Proxy | ||||
| Reflect | ||||
| Promise |
網(wǎng)站名稱:創(chuàng)新互聯(lián)小程序教程:微信小程序 JavaScript支持情況
分享路徑:http://m.5511xx.com/article/codgcce.html


咨詢
建站咨詢
