微信小程序 JavaScript支持情况


本文整理自网络,侵删。

JavaScript 支持情况

运行限制

基于安全考虑,小程序中不支持动态执行 JS 代码,即:

  • 不支持使用 eval 执行 JS 代码
  • 不支持使用 new Function 创建函数

客户端 ES6 API 支持情况

微信小程序已经支持了绝大部分的 ES6 API,已支持的 API 如下(部分API依赖系统版本):

StringiOS8iOS9iOS10+Android
codePointAt
normalize??
includes
startsWith
endsWith
repeat
String.fromCodePoint
ArrayiOS8iOS9iOS10+Android
copyWithin
find
findIndex
fill
entries
keys
values??
includes?
Array.from
Array.of
NumberiOS8iOS9iOS10+Android
isFinite
isNaN
parseInt
parseFloat
isInteger
EPSILON
isSafeInteger
MathiOS8iOS9iOS10+Android
trunc
sign
cbrt
clz32
imul
fround
hypot
expm1
log1p
log10
log2
sinh
cosh
tanh
asinh
acosh
atanh
ObjectiOS8iOS9iOS10+Android
is
assign
getOwnPropertyDescriptor
keys
getOwnPropertyNames
getOwnPropertySymbols

OtheriOS8iOS9iOS10+Android
Symbol
Set
Map
Proxy???
Reflect
Promise



标签:微信小程序

相关阅读 >>

微信小程序 小程序使用opendelivery

微信小程序工具细节点

sdk数据库 aggregate返回排序后结果

微信小程序 开始

微信小程序 数据预拉取

微信小程序 仿原生跳转

微信小程序api 动画

微信小程序api 音频-audiocontext对象

sdk数据库 geo

微信小程序api 账号信息

更多相关阅读请进入《微信小程序》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...

    暂无评论...