JavaScript支持情況

2020-02-11 17:35 更新

運(yùn)行限制

基于安全考慮,小程序中不支持動(dòng)態(tài)執(zhí)行代碼:

  • 不支持 eval
  • 不支持 new Function() 創(chuàng)建函數(shù)


ES6 支持情況一覽表

字節(jié)小程序很大程度上是支持 es6 的,但是有少部分特性無(wú)法支持,目前的情況如下:

String

名稱(chēng) ios9 ios>=10 android
codePointAt
normalize ?
includes
startsWith
endsWith
repeat
String.fromCodePoint

Array

名稱(chēng) ios9 ios>=10 android
copyWithin
find
findIndex
fill
entries
keys
values
includes
Array.from
Array.of

Number

名稱(chēng) ios9 ios>=10 android
isFinite
isNaN
parseInt
parseFloat
Number.isInteger
Number.EPSILON
Number.isSafeInteger

Math

名稱(chēng) ios9 ios>=10 android
trunc
sign
cbrt
clz32
imul
fround
hypot
expm1
log1p
log10
log2
sinh
cosh
tanh
asinh
acosh
atanh

Object

名稱(chēng) ios9 ios>=10 android
is
assign
getOwnPropertyDescriptor
keys
getOwnPropertyNames
getOwnPropertySymbols

Other

名稱(chēng) ios9 ios>=10 android
Symbol
Set
Map
Proxy ?
Reflect
Promise
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)