微信小程序 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



标签:微信小程序

相关阅读 >>

微信小程序api 背景音频-背景音频管理器

微信小程序api-设备- 网络状态

sdk数据库 aggregate计算记录数

微信小程序api 绘图设置填充样式setfillstyle

微信小程序api color(绘图颜色)

体验微信小程序

微信小程序 q&a

微信小程序内容组件 text(文本)

微信小程序云开发服务端存储api 从云存储空间下载文件

微信小程序 小程序使用precancelorder

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




打赏

取消

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

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

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

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

评论

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