各个Javascript引擎及版本的差异

未来的工作会更多的涉及到多浏览器的兼容问题,所以这里先准备一点资料。
原文地址:http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(ECMAScript)

JavaScript version support

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
JavaScript Version1.3YesYes0.6YesYesYes ?Yes (?)
1.5NoNo0.6YesYesYes ? ?
1.6NoNo1.8NoNoNo ?No
1.7NoNo1.8.1NoNoNo ?No
1.8NoNoPlanned for 1.9NoNoNo ?No
2.0NoNoNoNoNoNo ?No

Standard Library

 Global object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Value propertiesNaN4.04.0 (?)0.6Yes ?Yes ? ?
Infinity4.04.0 (?)0.6Yes ?Yes ? ?
undefined5.5No (?)0.6Yes ?Yes ? ?
Function propertieseval(x)3.04.0 (?)0.6Yes ?Yes ? ?
parseInt(string [, radix])3.04.0 (?)0.6Yes ?Yes ? ?
parseFloat(string)3.04.0 (?)0.6Yes ?Yes ? ?
isNaN(number)4.04.0 (?)0.6Yes ?Yes ? ?
isFinite(number)4.04.0 (?)0.6Yes ?Yes ? ?
URI handling functionsdecodeURI(encodedURI)5.5No (?)0.6No ?Yes ? ?
decodeURIComponent(encodedURIComponent)5.5No (?)0.6No ?Yes ? ?
encodeURI(uri)5.5No (?)0.6No ?Yes ? ?
encodeURIComponent(uriComponent)5.5No (?)0.6No ?Yes ? ?
Constructor propertiesObject4.0 ?YesYes ?Yes ? ?
Function4.0 ?YesYes ?Yes ? ?
Array4.0 ?YesYes ?Yes ? ?
String3.0 ?YesYes ?Yes ? ?
Boolean3.0 ?YesYes ?Yes ? ?
Number3.0 ?YesYes ?Yes ? ?
Date3.0 ?YesYes ?Yes ? ?
RegExp4.0 ?YesYes ?Yes ? ?
Error5.0 ?YesYes ?Yes ? ?
EvalError5.0 ?YesNo ?No ? ?
RangeError5.0 ?YesNo ?No ? ?
ReferenceError5.0 ?YesNo ?No ? ?
SyntaxError5.0 ?YesNo ?No ? ?
TypeError5.0 ?YesNo ?No ? ?
URIError5.0 ?YesNo ?No ? ?
Other propertiesMath3.0 ?YesYes ?Yes ? ?
Additional propertiesescape(string)3.0 ?YesYes ?Yes ? ?
unescape(string)3.0 ?YesYes ?Yes ? ?

 Object object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionObject([value]) ? ? ? ? ? ? ? ?
Called as constructornew Object([value])4.0 ?YesYes ?Yes ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype4.0 ?YesYes ?Yes ? ?
Properties of prototypeconstructor4.0 ?YesYes ?Yes ? ?
toString()4.0 ?YesYes ?Yes ? ?
toLocaleString()4.0 ?YesYes ?Yes ? ?
valueOf()4.0 ?YesYes ?Yes ? ?
hasOwnProperty(V)5.5 ?YesNo ?Yes ? ?
isPrototypeOf(V)5.5 ?YesNo ?Yes ? ?
propertyIsEnumerable(V)5.5 ?YesNo ?Yes ? ?

Function object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionFunction([[p1 [, p2 [, ...]],] body]) ? ? ? ? ? ? ? ?
Called as constructornew Function([[p1 [, p2 [, ...]],] body])4.0 ?1.0Yes ?7.0 ? ?
Propertieslength ? ? ? ? ?Yes ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?
Properties of prototypelength ? ? ? ? ? ? ? ?
constructor4.0 ?1.0Yes ?7.0 ? ?
toString()4.0 ?1.0Yes ?7.0 ? ?
apply(thisArg, argArray)4.0 ?1.0Yes ?7.0 ? ?
call(thisArg [, arg1 [, arg2 [, ...]]])4.0 ?1.0Yes ?7.0 ? ?
Properties of instanceslength4.0 ?1.0Yes ?7.0 ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?

 Array object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionArray([item1 [, item2 [, ...]]]) ? ? ? ? ? ? ? ?
Called as constructornew Array([item1, item2 [, ...]])4.0 ?1.0Yes ?7.0 ? ?
new Array(len)4.0 ?1.0Yes ?7.0 ? ?
Propertieslength ? ?Yes ? ?Yes ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?
Properties of prototypelength ? ? ? ? ? ? ? ?
constructor4.0 ?1.0Yes ?7.0 ? ?
toString()4.0 ?1.0Yes ?7.0 ? ?
toLocaleString()5.5 ?1.0Yes ?7.0 ? ?
concat([item1 [, item2 [,...]]])4.0 ?1.0Yes ?7.0 ? ?
join(separator)4.0 ?1.0Yes ?7.0 ? ?
pop()5.5 ?1.0Yes ?7.0 ? ?
push([item1 [, item2 [,...]]])5.5 ?1.0Yes ?7.0 ? ?
reverse()4.0 ?1.0Yes ?7.0 ? ?
shift()5.5 ?1.0Yes ?7.0 ? ?
slice(start, end)4.0 ?1.0Yes ?7.0 ? ?
sort(comparefn)4.0 ?1.0Yes ?7.0 ? ?
splice(start, deleteCount [, item1 [, item2 [, ...]]])5.5 ?1.0Yes ?7.0 ? ?
unshift([item1 [, item2 [, ...]]])5.5 ?1.0Yes ?7.0 ? ?
Properties of instanceslength4.0 ?1.0Yes ?7.0 ? ?

 String object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionString([value]) ? ? ? ? ? ? ? ?
Called as constructornew String([value])3.0 ?1.0Yes ?7.0 ? ?
Propertieslength3.0 ?1.0Yes ?7.0 ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?
fromCharCode([char0 [, char1 [, ...]]])4.0 ?1.0Yes ?7.0 ? ?
Properties of prototypelength ? ? ? ? ? ? ? ?
constructor4.0 ?1.0Yes ?7.0 ? ?
toString()3.0 ?1.0Yes ?7.0 ? ?
valueOf()3.0 ?1.0Yes ?7.0 ? ?
charAt(pos)3.0 ?1.0Yes ?7.0 ? ?
charCodeAt(pos)5.5 ?1.0Yes ?7.0 ? ?
concat([string1 [, string2 [, ...]]])4.0 ?1.0Yes ?7.0 ? ?
indexOf(searchString, position)3.0 ?1.0Yes ?7.0 ? ?
lastIndexOf(searchString, position)3.0 ?1.0Yes ?7.0 ? ?
localeCompare(that)5.5 ?1.0Yes ?7.0 ? ?
match(regexp)4.0 ?1.0Yes ?7.0 ? ?
replace(searchValue, replaceValue)3.0 ?1.0Yes ?7.0 ? ?
search(regexp)4.0 ?1.0Yes ?7.0 ? ?
slice(start, end)4.0 ?1.0Yes ?7.0 ? ?
split(separator, limit)4.0 ?1.0No ?7.0 ? ?
substring(start, end)3.0 ?1.0Yes ?7.0 ? ?
toLowerCase()3.0 ?1.0Yes ?7.0 ? ?
toLocaleLowerCase(comparefn)3.0 ?1.0No ?7.0 ? ?
toUpperCase()3.0 ?1.0Yes ?7.0 ? ?
toLocaleUpperCase()3.0 ?1.0No ?7.0 ? ?
Additional properties of prototypesubstr(start, length)4.0 ?1.0Yes ?7.0 ? ?
Properties of instanceslength3.0 ?1.0Yes ?7.0 ? ?

 Boolean object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionBoolean([value]) ? ? ? ? ? ? ? ?
Called as constructornew Boolean([value])3.0 ?YesYes ?Yes ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype4.0 ?YesYes ?Yes ? ?
Properties of prototypeconstructor4.0 ?YesYes ?Yes ? ?
toString()4.0 ?YesYes ?Yes ? ?
valueOf()4.0 ?YesYes ?Yes ? ?

 Number object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionNumber([value]) ? ? ? ? ? ? ? ?
Called as constructornew Number([value])3.0 ?1.0Yes ?7.0 ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?
MAX_VALUE4.0 ?1.0Yes ?7.0 ? ?
MIN_VALUE4.0 ?1.0Yes ?7.0 ? ?
NaN4.0 ?1.0Yes ?7.0 ? ?
NEGATIVE_INFINITY4.0 ?1.0Yes ?7.0 ? ?
POSITIVE_INFINITY4.0 ?1.0Yes ?7.0 ? ?
Properties of prototypeconstructor4.0 ?1.0Yes ?7.0 ? ?
toString([radix])4.0 ?1.0Yes ?7.0 ? ?
toLocaleString()5.5 ?1.0Yes ?7.0 ? ?
valueOf()4.0 ?1.0Yes ?7.0 ? ?
toFixed(fractionDigits)5.5 ?1.0Yes ?7.0 ? ?
toExponential(fractionDigits)5.5 ?1.0Yes ?7.0 ? ?
toPrecision(precision)5.5 ?1.0Yes ?7.0 ? ?

 Math object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Value propertiesE3.0 ?1.0Yes ?7.0 ? ?
LN103.0 ?1.0Yes ?7.0 ? ?
LN23.0 ?1.0Yes ?7.0 ? ?
LOG2E3.0 ?1.0Yes ?7.0 ? ?
LOG10E3.0 ?1.0Yes ?7.0 ? ?
SQRT1_23.0 ?1.0Yes ?7.0 ? ?
Function propertiesabs(x)3.0 ?1.0Yes ?7.0 ? ?
acos(x)3.0 ?1.0Yes ?7.0 ? ?
asin(x)3.0 ?1.0Yes ?7.0 ? ?
atan(x)3.0 ?1.0Yes ?7.0 ? ?
atan2(y, x)3.0 ?1.0Yes ?7.0 ? ?
ceil(x)3.0 ?1.0Yes ?7.0 ? ?
cos(x)3.0 ?1.0Yes ?7.0 ? ?
exp(x)3.0 ?1.0Yes ?7.0 ? ?
floor(x)3.0 ?1.0Yes ?7.0 ? ?
log(x)3.0 ?1.0Yes ?7.0 ? ?
max([value1 [, value2 [, ...]]])3.0 ?1.0Yes ?7.0 ? ?
min([value1 [, value2 [, ...]]])3.0 ?1.0Yes ?7.0 ? ?
pow(x, y)3.0 ?1.0Yes ?7.0 ? ?
random(x)3.0 ?1.0Yes ?7.0 ? ?
round(x)3.0 ?1.0Yes ?7.0 ? ?
sin(x)3.0 ?1.0Yes ?7.0 ? ?
sqrt(x)3.0 ?1.0Yes ?7.0 ? ?
tan(x)3.0 ?1.0Yes ?7.0 ? ?

 Date object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionDate ([year [, month [, date [, hours [, minutes [, seconds [, ms ]]]]]]]) ? ? ? ? ? ? ? ?
Called as constructornew Date (year, month [, date [, hours [, minutes [, seconds [, ms ]]]]])4.0 ?1.0Yes ?7.0 ? ?
new Date (value)4.0 ?1.0Yes ?7.0 ? ?
new Date ()4.0 ?1.0Yes ?7.0 ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?
parse(string)3.0 ?1.0Yes ?7.0 ? ?
Date.UTC (year, month [, date [, hours [, minutes [, seconds [, ms ]]]]])3.0 ?1.0Yes ?7.0 ? ?
Properties of prototypeconstructor4.0 ?1.0Yes ?7.0 ? ?
toString()4.0 ?1.0Yes ?7.0 ? ?
toDateString()4.0 ?1.0Yes ?7.0 ? ?
toTimeString()4.0 ?1.0Yes ?7.0 ? ?
toLocaleString()4.0 ?1.0Yes ?7.0 ? ?
toLocaleDateString()4.0 ?1.0Yes ?7.0 ? ?
toLocaleTimeString()4.0 ?1.0Yes ?7.0 ? ?
valueOf()4.0 ?1.0Yes ?7.0 ? ?
getTime()3.0 ?1.0Yes ?7.0 ? ?
getFullYear()4.0 ?1.0Yes ?7.0 ? ?
getMonth()3.0 ?1.0Yes ?7.0 ? ?
getUTCMonth()4.0 ?1.0Yes ?7.0 ? ?
getDate()3.0 ?1.0Yes ?7.0 ? ?
getUTCDate()4.0 ?1.0Yes ?7.0 ? ?
getDay()3.0 ?1.0Yes ?7.0 ? ?
getUTCDay()4.0 ?1.0Yes ?7.0 ? ?
getHours()3.0 ?1.0Yes ?7.0 ? ?
getUTCHours()4.0 ?1.0Yes ?7.0 ? ?
getMinutes()3.0 ?1.0Yes ?7.0 ? ?
getUTCMinutes()4.0 ?1.0Yes ?7.0 ? ?
getSeconds()3.0 ?1.0Yes ?7.0 ? ?
getUTCSeconds()4.0 ?1.0Yes ?7.0 ? ?
getMilliseconds()4.0 ?1.0Yes ?7.0 ? ?
getUTCMilliseconds()4.0 ?1.0Yes ?7.0 ? ?
getTimezoneOffset()4.0 ?1.0Yes ?7.0 ? ?
setTime(time)3.0 ?1.0Yes ?7.0 ? ?
setMilliseconds(ms)4.0 ?1.0Yes ?7.0 ? ?
setUTCMilliseconds(ms)4.0 ?1.0Yes ?7.0 ? ?
setSeconds(sec [, ms])3.0 ?1.0Yes ?7.0 ? ?
setUTCSeconds(sec [, ms])4.0 ?1.0Yes ?7.0 ? ?
setMinutes(min [, sec [, ms]])3.0 ?1.0Yes ?7.0 ? ?
setUTCMinutes(min [, sec [, ms]])4.0 ?1.0Yes ?7.0 ? ?
setHours(hour [, min [, sec [, ms]]])4.0 ?1.0Yes ?7.0 ? ?
setUTCHours(hour [, min [, sec [, ms]]])4.0 ?1.0Yes ?7.0 ? ?
setDate(date)4.0 ?1.0Yes ?7.0 ? ?
setUTCDate(date)4.0 ?1.0Yes ?7.0 ? ?
setMonth(month [, date])3.0 ?1.0Yes ?7.0 ? ?
setUTCMonth(month [, date])4.0 ?1.0Yes ?7.0 ? ?
setFullYear(year [, month [, date]])4.0 ?1.0Yes ?7.0 ? ?
setUTCFullYear(year [, month [, date]])4.0 ?1.0Yes ?7.0 ? ?
toUTCString()4.0 ?1.0Yes ?7.0 ? ?
Additional properties of prototypegetYear()3.0 ?1.0Yes ?7.0 ? ?
setYear(year)3.0 ?1.0Yes ?7.0 ? ?
toGMTString()4.0 ?1.0Yes ?7.0 ? ?

RegExp object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionRegExp (pattern, flags) ? ? ? ? ? ? ? ?
Called as constructornew RegExp (pattern, flags)4.0 ?1.0Yes ?7.0 ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype4.0 ?1.0Yes ?7.0 ? ?
Properties of prototypeconstructor4.0 ?1.0Yes ?7.0 ? ?
exec(string)4.0 ?1.0Yes ?7.0 ? ?
test(string)4.0 ?1.0Yes ?7.0 ? ?
toString()4.0 ?1.0Yes ?7.0 ? ?
Properties of instancessource4.0 ?1.0Yes ?7.0 ? ?
global4.0 ?1.0Yes ?7.0 ? ?
ignoreCase5.5 ?1.0Yes ?7.0 ? ?
multiline5.5 ?1.0Yes ?7.0 ? ?
lastIndex4.0 ?1.0Yes ?7.0 ? ?

 Error object

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionError (message) ? ? ? ? ? ? ? ?
Called as constructornew Error (message)5.0 ?1.0Yes ?7.0 ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype5.0 ?1.0Yes ?7.0 ? ?
Properties of prototypeconstructor5.0 ?1.0Yes ?7.0 ? ?
name5.5 ?1.0Yes ?7.0 ? ?
message5.5 ?1.0Yes ?7.0 ? ?
toString()5.0 ?1.0Yes ?7.0 ? ?

NativeError objects

 TridentTasmanGeckoWebCoreKHTMLPrestoiCab
Name of JavaScript EngineJScriptJScriptSpiderMonkeyJavaScriptCoreKJSlinear_bfutharkInScript
Called as functionEvalError (message) ? ? ? ? ? ? ? ?
RangeError (message) ? ? ? ? ? ? ? ?
ReferenceError (message) ? ? ? ? ? ? ? ?
SyntaxError (message) ? ? ? ? ? ? ? ?
TypeError (message) ? ? ? ? ? ? ? ?
URIError (message) ? ? ? ? ? ? ? ?
Called as constructornew EvalError (message) ? ? ? ? ? ? ? ?
new RangeError (message) ? ? ? ? ? ? ? ?
new ReferenceError (message) ? ? ? ? ? ? ? ?
new SyntaxError (message) ? ? ? ? ? ? ? ?
new TypeError (message) ? ? ? ? ? ? ? ?
new URIError (message) ? ? ? ? ? ? ? ?
Propertieslength ? ? ? ? ? ? ? ?
prototype ? ? ? ? ? ? ? ?
Properties of prototypeconstructor ? ? ? ? ? ? ? ?
name ? ? ? ? ? ? ? ?
message ? ? ? ? ? ? ? ?
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值