JavaScript engine

Last updated

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. [1]

Contents

JavaScript engines are typically developed by web browser vendors, and every major browser has one. In a browser, the JavaScript engine runs in concert with the rendering engine via the Document Object Model and Web IDL bindings. [2] However, the use of JavaScript engines is not limited to browsers; for example, the V8 engine is a core component of the Node.js runtime system. [3]

Since ECMAScript is the standardized specification of JavaScript, ECMAScript engine is another name for these implementations. With the advent of WebAssembly, some engines can also execute this code in the same sandbox as regular JavaScript code. [4] [3]

History

The first JavaScript engine was created by Brendan Eich in 1995 for the Netscape Navigator web browser. It was a rudimentary interpreter for the nascent language Eich invented. (This evolved into the SpiderMonkey engine, still used by the Firefox browser.) [5]

Google debuted its Chrome browser in 2008, with the V8 JavaScript engine that was faster than its competition. [6] [7] The key innovation was just-in-time compilation (JIT), which Mozilla had also been working on for SpiderMonkey. [8] Because of V8's performance, the other browser vendors needed to overhaul their engines for JIT. [9] Apple developed the Nitro engine for its Safari browser, which had 30% better performance than its predecessor. [10] Mozilla then leveraged portions of Nitro to improve SpiderMonkey. [11]

Since 2017, these engines have added support for WebAssembly. [4]

Notable engines

Related Research Articles

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

JavaScript, often abbreviated as JS, is a programming language and core technology of the Web, alongside HTML and CSS. 99% of websites use JavaScript on the client side for webpage behavior.

A browser engine is a core software component of every major web browser. The primary job of a browser engine is to transform HTML documents and other resources of a web page into an interactive visual representation on a user's device.

ECMAScript is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is standardized by Ecma International in the document ECMA-262.

<span class="mw-page-title-main">SpiderMonkey</span> JavaScript and WebAssembly engine maintained by the Mozilla Foundation

SpiderMonkey is an open-source JavaScript and WebAssembly engine by the Mozilla Foundation.

<span class="mw-page-title-main">Browser wars</span> Competition between web browsing applications for share of worldwide usage

A browser war is a competition for dominance in the usage share of web browsers. The "first browser war" (1995–2001) consisted of Internet Explorer and Netscape Navigator, and the "second browser war" (2004-2017) between Internet Explorer, Firefox, and Google Chrome.

This is a comparison of both historical and current web browsers based on developer, engine, platform(s), releases, license, and cost.

Netscape Plugin Application Programming Interface (NPAPI) is a deprecated application programming interface (API) for web browser plugins, initially developed for Netscape Navigator 2.0 in 1995 and subsequently adopted by other browsers.

ECMAScript for XML (E4X) was the standard ISO/IEC 22537:2006 programming language extension that adds native XML support to ECMAScript. The goal was to provide an alternative to DOM interfaces that uses a simpler syntax for accessing XML documents. It also offered a new way of making XML visible. Before the release of E4X, XML was always accessed at an object level. E4X instead treated XML as a primitive. This implied faster access, better support, and acceptance as a building block of a program.

Tamarin is a discontinued free software virtual machine with just-in-time compilation (JIT) support intended to implement the 4th edition of the ECMAScript (ES4) language standard. Tamarin source code originates from ActionScript Virtual Machine 2 (AVM2) developed by Adobe Systems, as introduced within Adobe Flash Player 9, which implements ActionScript 3 scripting language. ActionScript Virtual Machine 2 was donated as open-source to Mozilla Foundation on November 7, 2006, to develop Tamarin as a high-performance virtual machine, with the support from broad Mozilla community, to be used by Mozilla and Adobe Systems in the next generation of their JavaScript and ActionScript engines with the ultimate aim to unify the scripting languages across web browsers and Adobe Flash platform and ease the development of better performing rich web applications.

<span class="mw-page-title-main">Web development tools</span> Software used to test the UI of a website or web application

Web development tools allow web developers to test, modify and debug their websites. They are different from website builders and integrated development environments (IDEs) in that they do not assist in the direct creation of a webpage, rather they are tools used for testing the user interface of a website or web application.

V8 is a JavaScript and WebAssembly engine developed by Google for its Chrome browser. V8 is free and open-source software that is part of the Chromium project and also used separately in non-browser contexts, notably the Node.js runtime system.

<span class="mw-page-title-main">WebGL</span> JavaScript bindings for OpenGL in web browsers

WebGL is a JavaScript API for rendering interactive 2D and 3D graphics within any compatible web browser without the use of plug-ins. WebGL is fully integrated with other web standards, allowing GPU-accelerated usage of physics, image processing, and effects in the HTML canvas. WebGL elements can be mixed with other HTML elements and composited with other parts of the page or page background.

HTML video is a subject of the HTML specification as the standard way of playing video via the web. Introduced in HTML5, it is designed to partially replace the object element and the previous de facto standard of using the proprietary Adobe Flash plugin, though early adoption was hampered by lack of agreement as to which video coding formats and audio coding formats should be supported in web browsers. As of 2020, HTML video is the only widely supported video playback technology in modern browsers, with the Flash plugin being phased out.

Chakra is a proprietary JScript engine developed by Microsoft. It is used in the Internet Explorer web browser.

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.

Content Security Policy (CSP) is a computer security standard introduced to prevent cross-site scripting (XSS), clickjacking and other code injection attacks resulting from execution of malicious content in the trusted web page context. It is a Candidate Recommendation of the W3C working group on Web Application Security, widely supported by modern web browsers. CSP provides a standard method for website owners to declare approved origins of content that browsers should be allowed to load on that website—covered types are JavaScript, CSS, HTML frames, web workers, fonts, images, embeddable objects such as Java applets, ActiveX, audio and video files, and other HTML5 features.

asm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical language used for such applications.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

This is a list of articles related to the JavaScript programming language.

References

  1. Looper, Jen (21 September 2015). "A Guide to JavaScript Engines for Idiots". Telerik Developer Network. Archived from the original on 8 December 2018. Retrieved 8 December 2018.
  2. "How Blink Works". Google. Retrieved 12 March 2024.
  3. 1 2 "Documentation · V8". Google. Retrieved 3 March 2024.
  4. 1 2 Nelaturu, Keerthi. "WebAssembly: What's the big deal?". medium.com. Retrieved 3 March 2024.
  5. Fin JS (17 June 2016), "Brendan Eich – CEO of Brave", YouTube, retrieved 7 February 2018
  6. "Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome". PC Games Hardware. Computec Media AG. 3 July 2009. Archived from the original on 2 May 2012. Retrieved 28 June 2010.
  7. Purdy, Kevin (11 June 2009). "Lifehacker Speed Tests: Safari 4, Chrome 2". Lifehacker . Archived from the original on 14 April 2021. Retrieved 8 May 2021.
  8. "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog". Archived from the original on 4 December 2015. Retrieved 22 July 2020.
  9. "Mozilla asks, 'Are we fast yet?'". Wired. Archived from the original on 22 June 2018. Retrieved 18 January 2019.
  10. Safari 5 Released
  11. Shankland, Stephen (2 March 2010). "Opera 10.5 brings new JavaScript engine". CNET. CBS Interactive. Archived from the original on 3 October 2013. Retrieved 30 January 2012.
  12. Stachowiak, Maciej (9 November 2008). "Companies and Organizations that have contributed to WebKit". WebKit Wiki. Retrieved 13 April 2019.
  13. Belfiore, Joe (15 January 2020), New year, new browser – The new Microsoft Edge is out of preview and now available for download, Microsoft
  14. "Microsoft Edge and Chromium Open Source: Our Intent". Microsoft Edge Team. 6 December 2018. Retrieved 8 December 2018.