Comparison of JavaScript engines

Last updated

The following tables compare standards support for some notable JavaScript/ECMAScript engines used in web browsers.

Contents

Explanation of tables

See List of ECMAScript engines for a full list.

Values

These indicate the level of support for the given item in each engine. By default, the most recent version of the engine is implied. However, a specific version number can be listed; when this indicates full support, it's the initial version of the engine fully supporting the item.

Legend
ValueMeaning
YesFully supported
NoHas never been supported
PartialOnly some values are supported
IncorrectNot implemented correctly in all cases
ExperimentalMay be incomplete or buggy
Nightly build Currently in development; full support is expected
DependsOnly supported for the specified conditions
DroppedNo longer supported

ECMAScript version support

Overview of ECMAScript version support
Browser engine MSHTML Gecko WebKit Presto Blink
Corresponding JavaScript engine JScript / Chakra SpiderMonkey JavaScriptCore Linear B / Futhark / Carakan V8
ECMAScript Edition 3Yes0.6Yes1.0Yes
ECMAScript Edition 55.02.0PartialYesYes
ECMAScript Edition 6?????
JavaScript 1.5 extensionsNo0.6Yes1.0Yes
JavaScript 1.6 extensions
(excluding E4X)
No1.8PartialPartialPartial
JavaScript 1.7 extensionsNo1.8.1NoPartialNo
JavaScript 1.8 extensionsNo1.9PartialNoPartial
JavaScript 1.8.1 extensionsNo1.9.1NoNoNo
JScript .NET extensionsNoNoNoNoNo
ActionScript extensionsNoNoNoNoNo
E4X NoDropped [1] NoNoNo

Standard library

Global object

Implementation of global objects
Global object MSHTML Gecko WebKit Presto Blink
Value properties
NaN4.00.6YesYesYes
Infinity4.00.6YesYesYes
undefined5.50.6YesYesYes
Function properties
eval(x)3.00.6YesYesYes
parseInt(string [, radix])3.00.6YesYesYes
parseFloat(string)3.00.6YesYesYes
isNaN(number)4.00.6YesYesYes
isFinite(number)4.00.6YesYesYes
URI handling functions
decodeURI(encodedURI)5.50.6YesYesYes
decodeURIComponent(encodedURIComponent)5.50.6YesYesYes
encodeURI(uri)5.50.6YesYesYes
encodeURIComponent(uriComponent)5.50.6YesYesYes
Constructor properties
Object4.0YesYesYesYes
Function4.0YesYesYesYes
Array4.0YesYesYesYes
String3.0YesYesYesYes
Boolean3.0YesYesYesYes
Number3.0YesYesYesYes
Date3.0YesYesYesYes
RegExp4.0YesYesYesYes
Error5.0YesYesYesYes
EvalError5.0YesYesYesYes
RangeError5.0YesYesYesYes
ReferenceError5.0YesYesYesYes
SyntaxError5.0YesYesYesYes
TypeError5.0YesYesYesYes
URIError5.0YesYesYesYes
Other properties
Math3.0YesYesYesYes
Additional properties
escape(string)3.0YesYesYesYes
unescape(string)3.0YesYesYesYes

Object object

Implementation of object objects
Object object MSHTML Gecko WebKit Presto Blink
Called as function
Object([value])YesYesYesYesYes
Called as constructor
new Object([value])4.0YesYesYesYes
Properties
prototype4.0YesYesYesYes
Properties of prototype
constructor4.0YesYesYesYes
toString()4.0YesYesYesYes
toLocaleString()4.0YesYesYesYes
valueOf()4.0YesYesYesYes
hasOwnProperty(V)5.5Yes3YesYes
isPrototypeOf(V)5.5Yes3YesYes
propertyIsEnumerable(V)5.5Yes3YesYes

Function object

Implementation of function objects
Function object MSHTML Gecko WebKit Presto Blink
Called as function
{{code|Function([[p1 [, p2 [, ...]],] body])}}?YesYes?Yes
Called as constructor
{{code|new Function([[p1 [, p2 [, ...]],] body])}}4.01.0Yes1.0Yes
Properties
length?1.0YesYesYes
prototype4.01.0Yes1.0Yes
Properties of prototype
length?1.0Yes?Yes
constructor4.01.0Yes1.0Yes
toString()4.01.0Yes1.0Yes
apply(thisArg, argArray)4.01.0Yes1.0Yes
call(thisArg [, arg1 [, arg2 [, ...]]])4.01.0Yes1.0Yes
Properties of instances
length4.01.0Yes1.0Yes
prototype4.01.0Yes1.0Yes

Array object

Implementation of array objects
Array object MSHTML Gecko WebKit Presto Blink
Called as function
Array([item1 [, item2 [, ...]]])YesYesYesYesYes
Called as constructor
new Array([item1, item2 [, ...]])4.01.0Yes1.0Yes
new Array(len)4.01.0Yes1.0Yes
Properties
prototype4.01.0Yes1.0Yes
Properties of prototype
constructor4.01.0Yes1.0Yes
toString()4.01.0Yes1.0Yes
toLocaleString()5.51.0Yes1.0Yes
concat([item1 [, item2 [,...]]])4.01.0Yes1.0Yes
join(separator)4.01.0Yes1.0Yes
pop()5.51.0Yes1.0Yes
push([item1 [, item2 [,...]]])5.51.0Yes1.0Yes
reverse()4.01.0Yes1.0Yes
shift()5.51.0Yes1.0Yes
slice(start, end)4.01.0Yes1.0Yes
sort(comparefn)4.01.0Yes1.0Yes
splice(start, deleteCount [, item1 [, item2 [, ...]]])5.51.0Yes1.0Yes
unshift([item1 [, item2 [, ...]]])5.51.0Yes1.0Yes
indexOf(searchElement[, fromIndex])9.0 [2] 1.85222.1Yes
lastIndexOf(searchElement[, fromIndex])1.85222.1Yes
filter(callback[, thisObject])1.85222.1Yes
forEach(callback[, thisObject])1.85222.1Yes
every(callback[, thisObject])1.85222.1Yes
map(callback[, thisObject])1.85222.1Yes
some(callback[, thisObject])1.85222.1Yes
reduce(callback[, initialValue])1.95282.5.22Yes
reduceRight(callback[, initialValue])1.95282.5.22Yes
Properties of instances
length4.01.0Yes1.0Yes

String object

Implementation of string objects
String object MSHTML Gecko WebKit Presto Blink
Called as function
String([value])YesYesYesYesYes
Called as constructor
new String([value])3.01.0Yes1.0Yes
Properties
prototype4.01.0Yes1.0Yes
fromCharCode([char0 [, char1 [, ...]]])4.01.0Yes1.0Yes
Properties of prototype
constructor4.01.0Yes1.0Yes
toString()3.01.0Yes1.0Yes
valueOf()3.01.0Yes1.0Yes
charAt(pos)3.01.0Yes1.0Yes
charCodeAt(pos)5.51.0Yes1.0Yes
concat([string1 [, string2 [, ...]]])4.01.0Yes1.0Yes
indexOf(searchString, position)3.01.0Yes1.0Yes
lastIndexOf(searchString, position)3.01.0Yes1.0Yes
localeCompare(that)5.51.0Yes1.0Yes
match(regexp)4.01.0Yes1.0Yes
replace(searchValue, replaceValue)3.01.0Yes1.0Yes
search(regexp)4.01.0Yes1.0Yes
slice(start, end)4.01.0Yes1.0Yes
split(separator, limit)4.01.0Yes1.0Yes
substring(start, end)3.01.0Yes1.0Yes
toLowerCase()3.01.0Yes1.0Yes
toLocaleLowerCase(comparefn)3.01.0Yes1.0Yes
toUpperCase()3.01.0Yes1.0Yes
toLocaleUpperCase()3.01.0Yes1.0Yes
Additional properties of prototype
substr(start, length)4.01.0Yes1.0Yes
Properties of instances
length3.01.0Yes1.0Yes

Boolean object

Implementation of Boolean objects
Boolean object MSHTML Gecko WebKit Presto Blink
Called as function
Boolean([value])YesYesYesYesYes
Called as constructor
new Boolean([value])3.0YesYesYesYes
Properties
prototype4.0YesYesYesYes
Properties of prototype
constructor4.0YesYesYesYes
toString()4.0YesYesYesYes
valueOf()4.0YesYesYesYes

Number object

Implementation of number objects
Number object MSHTML Gecko WebKit Presto
Called as function
Number([value])?YesYes?
Called as constructor
new Number([value])3.01.0Yes1.0
Properties
prototype4.01.0Yes1.0
MAX_VALUE4.01.0Yes1.0
MIN_VALUE4.01.0Yes1.0
NaN4.01.0Yes1.0
NEGATIVE_INFINITY4.01.0Yes1.0
POSITIVE_INFINITY4.01.0Yes1.0
Properties of prototype
constructor4.01.0Yes1.0
toString([radix])4.01.0Yes1.0
toLocaleString()5.51.0Yes1.0
valueOf()4.01.0Yes1.0
toFixed(fractionDigits)5.51.0Yes1.0
toExponential(fractionDigits)5.51.0Yes1.0
toPrecision(precision)5.51.0Yes1.0

Math object

Implementation of math objects
Math object MSHTML Gecko WebKit Presto
Value properties
E3.01.0Yes1.0
LN103.01.0Yes1.0
LN23.01.0Yes1.0
LOG2E3.01.0Yes1.0
LOG10E3.01.0Yes1.0
PIYesYesYesYes
SQRT1_23.01.0Yes1.0
SQRT2YesYesYesYes
Function properties
abs(x)3.01.0Yes1.0
acos(x)3.01.0Yes1.0
asin(x)3.01.0Yes1.0
atan(x)3.01.0Yes1.0
atan2(y, x)3.01.0Yes1.0
ceil(x)3.01.0Yes1.0
cos(x)3.01.0Yes1.0
exp(x)3.01.0Yes1.0
floor(x)3.01.0Yes1.0
log(x)3.01.0Yes1.0
max([value1 [, value2 [, ...]]])3.01.0Yes1.0
min([value1 [, value2 [, ...]]])3.01.0Yes1.0
pow(x, y)3.01.0Yes1.0
random()3.01.0Yes1.0
round(x)3.01.0Yes1.0
sin(x)3.01.0Yes1.0
sqrt(x)3.01.0Yes1.0
tan(x)3.01.0Yes1.0

Date object

Implementation of date objects
Date object MSHTML Gecko WebKit Presto
Called as function
Date ([year [, month [, date [, hours [, minutes [, seconds [, ms ]]]]]]])????
Called as constructor
new Date (year, month [, date [, hours [, minutes [, seconds [, ms ]]]]])4.01.0Yes1.0
new Date (value)4.01.0Yes1.0
new Date ()4.01.0Yes1.0
Properties
prototype4.01.0Yes1.0
parse(string)3.01.0Yes1.0
UTC (year, month [, date [, hours [, minutes [, seconds [, ms ]]]]])3.01.0Yes1.0
Properties of prototype
constructor4.01.0Yes1.0
toString()4.01.0Yes1.0
toDateString()4.01.0Yes1.0
toTimeString()4.01.0Yes1.0
toLocaleString()4.01.0Yes1.0
toLocaleDateString()4.01.0Yes1.0
toLocaleTimeString()4.01.0Yes1.0
valueOf()4.01.0Yes1.0
getTime()3.01.0Yes1.0
getFullYear()4.01.0Yes1.0
getMonth()3.01.0Yes1.0
getUTCMonth()4.01.0Yes1.0
getDate()3.01.0Yes1.0
getUTCDate()4.01.0Yes1.0
getDay()3.01.0Yes1.0
getUTCDay()4.01.0Yes1.0
getHours()3.01.0Yes1.0
getUTCHours()4.01.0Yes1.0
getMinutes()3.01.0Yes1.0
getUTCMinutes()4.01.0Yes1.0
getSeconds()3.01.0Yes1.0
getUTCSeconds()4.01.0Yes1.0
getMilliseconds()4.01.0Yes1.0
getUTCMilliseconds()4.01.0Yes1.0
getTimezoneOffset()4.01.0Yes1.0
setTime(time)3.01.0Yes1.0
setMilliseconds(ms)4.01.0Yes1.0
setUTCMilliseconds(ms)4.01.0Yes1.0
setSeconds(sec [, ms])3.01.0Yes1.0
setUTCSeconds(sec [, ms])4.01.0Yes1.0
setMinutes(min [, sec [, ms]])3.01.0Yes1.0
setUTCMinutes(min [, sec [, ms]])4.01.0Yes1.0
setHours(hour [, min [, sec [, ms]]])4.01.0Yes1.0
setUTCHours(hour [, min [, sec [, ms]]])4.01.0Yes1.0
setDate(date)4.01.0Yes1.0
setUTCDate(date)4.01.0Yes1.0
setMonth(month [, date])3.01.0Yes1.0
setUTCMonth(month [, date])4.01.0Yes1.0
setFullYear(year [, month [, date]])4.01.0Yes1.0
setUTCFullYear(year [, month [, date]])4.01.0Yes1.0
toUTCString()4.01.0Yes1.0
Additional properties of prototype
getYear()3.01.0Yes1.0
setYear(year)3.01.0Yes1.0
toGMTString()4.01.0Yes1.0

RegExp object

Implementation of RegExp objects
RegExp object MSHTML Gecko WebKit Presto
Called as function
RegExp (pattern, flags)????
Called as constructor
new RegExp (pattern, flags)4.01.0Yes1.0
Properties
prototype4.01.0Yes1.0
Properties of prototype
constructor4.01.0Yes1.0
exec(string)4.01.0Yes1.0
test(string)4.01.0Yes1.0
toString()4.01.0Yes1.0
Properties of instances
source4.01.0Yes1.0
global4.01.0Yes1.0
ignoreCase5.51.0Yes1.0
multiline5.51.0Yes1.0
lastIndex4.01.0Yes1.0

Error object

Implementation of error objects
Error object MSHTML Gecko WebKit Presto
Called as function
Error (message)????
Called as constructor
new Error (message)5.01.0Yes1.0
Properties
prototype5.01.0Yes1.0
Properties of prototype
constructor5.01.0Yes1.0
name5.51.0Yes1.0
message5.51.0Yes1.0
toString()5.01.0Yes1.0

NativeError objects

Implementation of NativeError objects
NativeError object MSHTML Gecko WebKit Presto
Called as function
EvalError (message)?1.0Yes?
RangeError (message)?1.0Yes?
ReferenceError (message)?1.0Yes?
SyntaxError (message)?1.0Yes?
TypeError (message)?1.0Yes?
URIError (message)?1.0Yes?
Called as constructor
new EvalError (message)?1.0Yes?
new RangeError (message)?1.0Yes?
new ReferenceError (message)?1.0Yes?
new SyntaxError (message)?1.0Yes?
new TypeError (message)?1.0Yes?
new URIError (message)?1.0Yes?
Properties
prototype?1.0??
Properties of prototype
constructor?1.0??
name?1.0Yes?
message?1.0Yes?

Related Research Articles

<span class="mw-page-title-main">Document Object Model</span> Convention for representing and interacting with objects in HTML, XHTML and XML documents

The Document Object Model (DOM) is a cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers attached to them. Once an event is triggered, the event handlers get executed.

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

Gecko is a browser engine developed by Mozilla. It is used in the Firefox browser, the Thunderbird email client, and many other projects.

ECMAScript (ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the document ECMA-262.

SpiderMonkey JavaScript engine maintained by the Mozilla Foundation

SpiderMonkey is the first JavaScript engine, written by Brendan Eich at Netscape Communications, later released as open source and currently maintained by the Mozilla Foundation. It is used in the Firefox web browser.

JScript is Microsoft's legacy dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer 11 and older.

Presto was the browser engine of the Opera web browser from the release of Opera 7 on 28 January 2003, until the release of Opera 15 on 2 July 2013, at which time Opera switched to using the Blink engine that was originally created for Chromium. Presto was also used to power the Opera Mini and Opera Mobile browsers.

Ctags is a programming tool that generates an index file of names found in source and header files of various programming languages to aid code comprehension. Depending on the language, functions, variables, class members, macros and so on may be indexed. These tags allow definitions to be quickly and easily located by a text editor, a code search engine, or other utility. Alternatively, there is also an output mode that generates a cross reference file, listing information about various names found in a set of language files in human-readable form.

A JavaScript engine is a software component that executes JavaScript code. The first JavaScript engines were mere interpreters, but all relevant modern engines use just-in-time compilation for improved performance.

The following tables compare XHTML compatibility and support for a number of browser engines.

The following tables compare Document Object Model (DOM) compatibility and support for a number of JavaScript engines used in web browsers.

Cross-browser compatibility is the ability of a website or web application to function across different browsers and degrade gracefully when browser features are absent or lacking.

Acid3 Online HTML rendering test

The Acid3 test is a web test page from the Web Standards Project that checks a web browser's compliance with elements of various web standards, particularly the Document Object Model (DOM) and JavaScript.

<span class="mw-page-title-main">Internet Explorer 9</span> Version of Internet Explorer

Internet Explorer 9 or IE9 is a web browser for Windows. It was released by Microsoft on March 14, 2011, as the ninth version of Internet Explorer and the successor to Internet Explorer 8, and can replace previous versions of Internet Explorer on Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2 but unlike version 8, this version does not support Windows XP and Windows Server 2003. It and older versions of Internet Explorer are no longer supported. Microsoft released Internet Explorer 9 as a major out-of-band version that was not tied to the release schedule of any particular version of Windows, unlike previous versions. It is the first version of Internet Explorer not to be bundled with a Windows operating system, although some OEMs have installed it with Windows 7 on their PCs, as well as new Windows 7 laptops.

ELinks Text-based web browser

ELinks is a free text-based web browser for Unix-like operating systems.

A browser speed test is a computer benchmark that scores the performance of a web browser, by measuring the browser's efficiency in completing a predefined list of tasks. In general the testing software is available online, located on a website, where different algorithms are loaded and performed in the browser client. Typical test tasks are rendering and animation, DOM transformations, string operations, mathematical calculations, sorting algorithms, graphic performance tests and memory instructions. Browser speed tests have been used during browser wars to prove superiority of specific web browsers. The popular Acid3 test is no particular speed test but checks browser conformity to web standards.

In web development, a polyfill is code that implements a feature on web browsers that do not natively support the feature. Most often, it refers to a JavaScript library that implements an HTML5 or CSS web standard, either an established standard on older browsers, or a proposed standard on existing browsers. Formally, "a polyfill is a shim for a browser API."

JavaScript Interpreter SHell is a scripting language designed for use in embedded systems.

Deno (software) Secure Javascript and Typescript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

References

  1. E4X, Mozilla
  2. ECMAScript 5 Arrays, Microsoft, archived from the original on 2010-06-27, retrieved 2010-06-24

Further reading