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



标签:微信小程序

相关阅读 >>

微信小程序 code2seesion

微信小程序 画布

微信小程序 访问留存

微信小程序云开发api 获取记录的引用

微信小程序 注册页面

微信小程序 运力方使用onorderaddtips

微信小程序 扩展组件可选文本组件

微信小程序开放数据 ad-custom

微信小程序云开发sdk文档 微信支付统一下单

微信小程序云开发api 查询筛选条件

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




打赏

取消

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

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

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

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

评论

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