ECMAScript 5/6/7 compatibility tables

Related tags

ES6 compat-table
Overview

ECMAScript compatibility tables

Gitter

Bitdeli Badge

Editing the tests

Edit the data-es5.js, data-es6.js, data-esnext.js, or data-non-standard.js files to adjust the tests and their recorded browser results. Run node build.js to build the HTML files from these JavaScript sources.

The ES6 tests themselves should be written in pure ES3, except for the sole ES6 feature being tested (as well as any ES5 features strictly required to use the ES6 feature). ES Next tests may use any ES5 features that they wish, and only the ES6 features strictly required to use the ES Next feature.

The test code is placed in multi-line comments (as in this hack), so that Node.js can parse the data scripts without throwing syntax errors when encountering features it does not support. The build.js script will wrap the code in an eval call inside a try, so the tests themselves do not need to catch errors that non-supporting platforms may throw.

Most tests have a significance rating, which affects how a platform's total support percentage is calculated. A test rated "large" (representing a landmark, transformative feature) is worth 1, one rated "medium" (representing a significant feature that's less universally useful, or is primarily connected to another feature) is worth 0.5, and one rated "small" (representing a useful but subtle improvement from the previous spec) is worth 0.25. "tiny" (0.125) should be reserved for very meager changes (such as changes to an existing function's parameters or side-effects) that nonetheless don't fall under the category of another feature.

In order to test compilers

Run npm install to install the compilers under test (and remember to npm update them frequently). Then run node build.js compilers to create compiler test pages under es6/compilers. Currently only the ES6 tests produce compiler test pages. Open the compilers' HTML files in a browser with close to zero native ES6 support, such as Internet Explorer 9 (although its lack of support for strict mode will cause some tests to fail), Opera 12, or Safari 5.1 (bearing in mind their native support for TypedArrays, __proto__ and such).

Note that some tests cannot be compiled correctly, as they rely on runtime eval() results to ensure that, for instance, certain syntactic constructs are syntax errors. These will fail on the compiler test pages. Support for those features should be divined manually.

In order to test Node.js

After installing dependencies using npm install, first compile a fresh ES6 HTML file using node build.js.

Then, run node ., where node is the executable you wish to test, along with any desired flags (such as --es-staging). The results should be printed in colour in stdout: green results indicate correct support, cyan results indicate support that incorrectly requires strict mode, and red indicates no support.

Note that this script is currently hard-coded to only display ES6 results.

Comments
  • ES6 tail calls controversy

    ES6 tail calls controversy

    Certain anonymous sources tell me that basically all web browsers except Safari hate es6 tail calls because they slow the rest of JS down and that folks on TC39 also absolutely hate tail calls as well.

    Apparently, Chrome engineers also feel that one of the things keeping the pressure on implementing tail calls is our compatibility table.

    In light of all of this, I'm asked to consider to modify the tail call entry in a table to have an asterisk saying that there isn’t a lot of support for the feature or that it's controversial or something along those lines.

    I'm bringing it up here to see what ya'll think and if we can come to some kind of consensus.

    /cc @ljharb @sebmarkbage

    opened by kangax 32
  • Consolidating Firefox versions with identical results on ES intl

    Consolidating Firefox versions with identical results on ES intl

    This patch consolidates Firefox versions 29...35 with "36+", which all have identical results. This makes the resulting HTML both shorter and faster to process, without any loss of information.

    INTL 
    opened by afmenez 26
  • Fix Can't find private variable @derivedConstructor (Safari iOS 10.1 to 10.3.1)

    Fix Can't find private variable @derivedConstructor (Safari iOS 10.1 to 10.3.1)

    Async arrow functions as class private methods don't seem to work in Safari 10.1 to 10.3.1.

    I'm very new to compat-table so please review this carefuly.

    Context:

    • https://github.com/kangax/compat-table/issues/1419
    • https://github.com/babel/babel/issues/9465
    opened by adrienharnay 22
  • Dropping ancient IE versions

    Dropping ancient IE versions

    Microsoft has EOLed all versions of IE but IE11 more than a year ago: https://www.microsoft.com/en-us/windowsforbusiness/end-of-ie-support

    I am retiring these ancient versions from all tables.

    opened by afmenez 21
  • Update ES6 results for IE11

    Update ES6 results for IE11

    After the latest fixes from @Perelandric , it is now possible to run all tests with IE11 (the table layout is still broken, but at least the results are shown). This patch fixes all results that were wrong.

    opened by afmenez 20
  • Feature marked incorrectly for Safari 10

    Feature marked incorrectly for Safari 10

    babel-preset-env, which uses this table, ends up incorrectly excluding a plugin transform-es2015-block-scoping when targeting support of Safari 10.

    I believe this is due to the features const and let under bindings being marked completed but there is a bug in Safari 10, shown here where the following

    {
      let a = 3
    }
    
    let a = 3
    

    throws SyntaxError: Can't create duplicate variable that shadows a global property: 'a'

    References babel/babel-preset-env#411

    ES6 test code bug Help wanted 
    opened by ssilve1989 19
  • Point system seems subjective

    Point system seems subjective

    The compatibility table assigns features point values; "Minor difference (1 point)", "Landmark feature (8 points)" etc. But these ratings seem subjective. What makes a feature more or less significant?

    e.g., Promises, while useful, were already informally standardized and implemented in ES5. In my opinion that makes the feature less significant; yet it's labelled "landmark". Whereas tail calls are merely "significant" (apparently less ground-breaking than syntactic sugar like spread and computed object literal keys), even though tail calls enable new algorithms and programming styles.

    I'm not trying to convince you to re-rate these particular features. I'm pointing out that "significance" is a matter of opinion. Ratings aren't facts, which makes them seem out-of-place in a table of statistics.

    Rating the features doesn't seem to have anything to do with compatibility, unless the rating has some correlation to the probable difficulty of implementation. I suggest removing these ratings.

    opened by jacksonrayhamilton 19
  • accuracy of Math.cbrt, Math.expm1, Math.log1p

    accuracy of Math.cbrt, Math.expm1, Math.log1p

    var error = function (x, value) {
      return Math.abs(1 - x / value) / 2.220446049250313e-16; // error in number of ulps (http://en.wikipedia.org/wiki/Unit_in_the_last_place)
    };
    

    Firefox < 48 on Windows:

    https://bugzilla.mozilla.org/show_bug.cgi?id=933257 https://bugzilla.mozilla.org/show_bug.cgi?id=897634

    error(Math.log1p(0.0006516748007717887), 0.0006514625529548382) > 500;
    error(Math.expm1(0.00001), 0.000010000050000166668) > 43000;
    error(Math.cbrt(-3.9355663969868275e+307), -3.401489081587483e+102) > 50;
    error(Math.asinh(-0.0005), -0.000499999979166669) > 100; // (caused by issues with `expm1` and `log1p` on Windows)
    error(Math.atanh(-0.0005), -0.0005000000416666729) > 100; // (caused by issues with `expm1` and `log1p` on Windows)
    

    Firefox

    Math.exp(1) !== Math.E
    

    Chrome < 54 on Windows:

    https://code.google.com/p/v8/issues/detail?id=3468 https://code.google.com/p/v8/issues/detail?id=3509

    error(Math.exp(-707.9999999999998), 3.30755300363916e-308) > 250;
    Math.acosh(1e+308) === Infinity;
    Math.asinh(1e+300) === Infinity;
    Math.atanh(1e-300) === 0;
    

    Konqueror 4.13 (Ubuntu):

    https://github.com/KDE/kjs/blob/master/src/kjs/math_object.cpp

       Math.expm1 == undefined && Math.exmp1 != undefined
       Math.LOG10E !== 0.4342944819032518 // 0.43429448190325176
       Math.abs(+0) === 0 && 1 / Math.abs(+0) < 0
       Math.hypot.length === 0
       Math.hypot(1e200, 1e200) === 1 / 0 // overflow and underflow issues
    
       Math.asinh == undefined;
       Math.clz32 == undefeined;
       Math.imul() == undefined;
    

    buggy Math.round in Safari 10 / Mobile Safari 10 / IE 11 / Edge 13 / Opera 12 / Konqueror 4.13:

    Math.round(0.49999999999999994) !== 0
    

    Math.pow issue in Firefox, Chrome, Safari, Edge when the second argument is an integer:

    https://code.google.com/p/v8/issues/detail?id=3599 https://bugzilla.mozilla.org/show_bug.cgi?id=618251

    error(Math.pow(10, 305), 1e+305) > 2;
    error(Math.pow(10, 308), 1e+308) > 2;
    error(Math.pow(9767, 77), 1.627839019440664e+307) > 8
    error(Math.pow(1 + Math.pow(2, -27), Math.pow(2, 31) - 1), 8886109.924647752) > Math.pow(2, 28)
    

    Chrome Mobile 52 (Android 5.1):

    Math.pow(11, Math.pow(11, 9)) === 0;
    

    Mobile Safari 10 (iOS 9.2):

    Math.expm1(709.782712893384) === -1;
    // note: Math.expm1(709.7827128933839) === 1.7976931348620688e+308
    

    es6-shim:

    nothing
    

    core-js:

    error(Math.acosh(1 + Number.EPSILON), 2.1073424255447017e-8) > 1e+7;
    Math.asinh(1e-300) === 0;
    Math.asinh(1e+300) === Infinity;
    Math.atanh(1e-300) === 0;
    error(Math.cbrt(1e-300), 1e-100) > 50;
    Math.cosh(710) === Infinity;
    error(Math.expm1(1e-6), 0.0000010000005000001665) > 1e+5;
    error(Math.log1p(1e-8), 9.999999950000001e-9) > 1e+7;
    + Math.sinh, Math.tanh (because of expm1)
    

    Traceur AND MDN's polyfills:

    Math.acosh(1e+308) === Infinity;
    error(Math.acosh(1 + Number.EPSILON), 2.1073424255447017e-8) > 1e+7;
    Math.asinh(1e-300) === 0;
    Math.asinh(1e+300) === Infinity;
    Math.atanh(1e-300) === 0;
    error(Math.cbrt(1e-300), 1e-100) > 50;
    Math.cosh(710) === Infinity;
    Math.sinh(710) === Infinity;
    Math.sinh(1e-300) === 0;
    Math.tanh(1e-300) === 0;
    Math.tanh(1e+300) !== Math.tanh(1e+300);
    Math.expm1(1e-300) === 0;
    Math.log1p(1e-300) === 0;
    

    Closure:

    Math.acosh(1e+308) === Infinity;
    error(Math.acosh(1 + Number.EPSILON), 2.1073424255447017e-8) > 1e+7;
    Math.asinh(1e-300) === 0;
    Math.asinh(1e+300) === Infinity;
    error(Math.cbrt(1e-300), 1e-100) > 50;
    Math.cosh(710) === Infinity;
    Math.sinh(710) === Infinity;
    Math.sinh(1e-300) === 0;
    Math.tanh(1e-300) === 0;
    Math.hypot(0, 0) !== Math.hypot(0, 0)
    Math.hypot(1, Infinity) !== Math.hypot(1, Infinity)
    
    opened by Yaffle 19
  • Freeze table header if we scroll down table

    Freeze table header if we scroll down table

    Now it looks like: compat1

    and if we scroll down table that we couldn't see which column matches to which browser: compat2

    I'd like to propose to freeze table header while scrolling the table, so this UI will be more understandable: compat_good

    opened by greybax 18
  • 'Array find from last' and 'Hashbang Grammar' moved to Stage 4

    'Array find from last' and 'Hashbang Grammar' moved to Stage 4

    https://github.com/tc39/proposals/commit/3abfcf0e96878be0f20084904f25e113e0b0e73b https://github.com/tc39/proposals/commit/1482a975504428518b44fe0b6adbc5ffe5b54a79

    opened by afmenez 17
  • removed Object.observe

    removed Object.observe

    The Object.observe() proposal has been withdrawn by its original author, Adam Klein (https://mail.mozilla.org/pipermail/es-discuss/2015-November/044684.html). Therefore I removed it all references from the ES7 table. #680

    opened by crunchtime-ali 17
  • Should Safari 15.4 have its own entry?

    Should Safari 15.4 have its own entry?

    opened by JohnRiv 1
  • Add an 'updateResult' utility function to upsert values into `data-*` files

    Add an 'updateResult' utility function to upsert values into `data-*` files

    As far as I could tell, the current accepted practice to update data- files is to use a script to suggest the changes to a console and then to make manual updates.

    This is a lot of work for new runtimes, and doesn't lend well to automating as part of a runtime release process.

    This is a simple utility to parse and update res objects in place. It may be called from the test runner scripts - I used it to generate https://github.com/kangax/compat-table/pull/1808.

    Because it uses an actual parser it should be robust to syntax gotchas like code-in-strings, but it makes a few basic assumptions that hold for the data files as they are now, like:

    • Data files have an exports.tests = [ /* ... */ ] section
    • Tests must have an object-literal res property, or an array-literal subtests property.
    opened by robhogan 8
  • Add results for Hermes 0.8.1 to 0.11.0

    Add results for Hermes 0.8.1 to 0.11.0

    Adds results for Hermes versions:

    0.7.0 (already mostly present) 0.8.0 0.9.0 0.10.0 0.11.0

    I'm part of the React Native team at Meta, and we're looking to give more visibility to Hermes feature support as we move towards Hermes as default for React Native. Thanks for providing this platform!

    (NB: In practice, because Hermes is focused on bytecode performance over syntax support, JS support in React Native is heavily augmented by Babel - I'm planning to follow up this PR with the addition of "React Native" as a runtime from RN 0.68 - effectively this will be Hermes + RN's bundled Babel preset)

    Preview: https://robhogan.github.io/compat-table/es6/#hermes0_11_0

    CC @neildhar

    (Currently in draft to give the Hermes team a chance to review footnotes, etc.)

    opened by robhogan 1
  • Custom compat tables

    Custom compat tables

    As discussed in #1790 a prototype to allow creating custom compat tables

    Usage node build environments=./custom.json excludecurrent

    With custom.json being a custom environments file, for example having the following content:

    {
      "rhino1_7_13": {
        "full": "Rhino 1.7.13",
        "short": "Rhino 1.7.13",
        "family": "Rhino",
        "platformtype": "engine",
        "release": "2020-09-02"
      },
      "rhino1_7_14": {
        "full": "Rhino 1.7.14",
        "short": "Rhino 1.7.14",
        "family": "Rhino",
        "platformtype": "engine",
        "release": "2022-01-06"
      }
    }
    

    This PR is a draft, just to get the discusion going. Needs cleanup + more:

    • Hide engines from the legenda that aren't used in the provided environments file
    • Hide unstable/obsolete checkboxes if the provided environments file doesn't contain any unstable/obsolete browsers
    • Remove sort by Engine Type, if only one engine type is is used with the environments file
    • Remove entire platformType header if the browsers in the environments file are all of the same platformType

    One question: the code in build.js isn't using modern JavaScript features. Is that on purpose?

    Closes #1790 Closes #1198

    opened by p-bakker 2
  • Would a PR making custom compat-tables easier be welcomed?

    Would a PR making custom compat-tables easier be welcomed?

    Hi,

    I'm wondering if a PR that would make building custom compat-tables easier be welcomed.

    I'd like to add the following options to build.js:

    • specify which file to use instead of environments.json
    • ability to exclude the testresults for the current browser

    And then changes to build.js/master.js to hide non-applicable stuff from the UI, like:

    • engines from the legenda that aren't referenced in the provided environments file
    • unused platformtype headings
    • unused obsolete/unstable checkboxes
    • etc

    Currently at least NodeJS and Rhino hosts their own version of compat-tables (containing just NodeJS/Rhino versions), based on a very old version of this repo.

    Not sure if NodeJS would switch, but for Rhino I'd rather be able to build our custom compat-tables using the latest version of this repo, instead of some modified fork.

    I did some prototyping and got the basics going, but before putting in the effort to make it a polished PR, I'd like to know if it has any chance of getting accepted.

    Paul

    opened by p-bakker 5
  • ES6: In “Proxy, internal 'get' calls”, make the “RegExp.prototype.flags” test future-proof (failing because of `hasIndices`)

    ES6: In “Proxy, internal 'get' calls”, make the “RegExp.prototype.flags” test future-proof (failing because of `hasIndices`)

    hasIndices (the d flag) is a new RegExp flag supported in pre-release versions of major browsers. It’s causing the “RegExp.prototype.flags” test in the “Proxy, internal 'get' calls” section to fail again (see #1208).

    How can we avoid this in the future? What is this test really testing? It’s not supposed to test RegExp flag support, but implicit get calls to a Proxy (from the flags getter), right? So why not limit the test to one or two well-supported flags? For example:

    const queriedProperties = [];
    
    Object.getOwnPropertyDescriptor(RegExp.prototype, "flags")
      .get
      .call(new Proxy({}, {
        get(object, key) {
          queriedProperties.push(key);
    
          return object[key];
        }
      }));
    
    return queriedProperties.includes("global") && queriedProperties.includes("ignoreCase")
      && queriedProperties.indexOf("global") < queriedProperties.indexOf("ignoreCase"); // Testing order.
    

    Of course, the actual code would probably use var, and other more compatible constructs.

    By the way, in the current test, there’s also a typo: // Sorted alphabetically by shortname – "gumsuy".. That should be “gimsuy”, or with the additional flag: “dgimsuy”, but of course this may become obsolete, depending on how the updated test is implemented.

    opened by SebastianSimon 1
Owner
Juriy Zaytsev
I used to write JavaScript. I still do but I used to too.
Juriy Zaytsev
ECMAScript 6: Feature Overview & Comparison

es6-features.org ECMAScript 6: Feature Overview & Comparison Copyright (c) 2015-2017 Ralf S. Engelschall <[email protected]> <@engelschall> Partiall

Dr. Ralf S. Engelschall 6.2k Dec 27, 2022
Shrinks any large data tables into compact and responsive tables

jquery.table-shrinker A Jquery plugin to make HTML Table responsive across all devices, the right way! Demo Click here to see the demo, remember to re

null 29 Sep 11, 2022
An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor.

Obsidian Excel to Markdown Table An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor. Demo You can paste the copied Excel d

Ganessh Kumar 108 Jan 4, 2023
Quill is a modern WYSIWYG editor built for compatibility and extensibility.

Note: This branch and README covers the upcoming 2.0 release. View 1.x docs here. Quill Rich Text Editor Quickstart • Documentation • Development • Co

Quill 34.3k Jan 2, 2023
Proof of concept: support immutable trpc servers using lambdas to ensure client/server compatibility

auto-versioned-trpc-aws-lambda Proof of concept to support an automatically versioned AWS Lambda running tRPC to ensure a somewhat graceful and automa

Kenneth Skovhus 5 Aug 30, 2022
Yet another linter rule to detect compatibility of CSS features.

stylelint-browser-compat Yet another linter rule to detect compatibility of CSS features. This plugin checks if the CSS you're using is supported by t

Masahiro Miyashiro (3846masa) 16 Dec 15, 2022
Overview of ECMAScript 6 features

ECMAScript 6 git.io/es6features Introduction ECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard. ES6 is a s

Luke Hoban 29.1k Jan 4, 2023
ECMAScript 6: Feature Overview & Comparison

es6-features.org ECMAScript 6: Feature Overview & Comparison Copyright (c) 2015-2017 Ralf S. Engelschall <[email protected]> <@engelschall> Partiall

Dr. Ralf S. Engelschall 6.2k Dec 27, 2022
ECMAScript parsing infrastructure for multipurpose analysis

Esprima (esprima.org, BSD license) is a high performance, standard-compliant ECMAScript parser written in ECMAScript (also popularly known as JavaScri

Ariya Hidayat 398 Dec 15, 2022
ECMAScript code beautifier/formatter

esformatter ECMAScript code beautifier/formatter. Important This tool is still missing support for many important features. Please report any bugs you

Miller Medeiros 968 Nov 1, 2022
Curso de ECMAScript 6+ en Platzi

Curso de ECMAScript 6+ JavaScript es el lenguaje más utilizado para desarrollo de aplicaciones web, principalmente en el frontend. Cada año, ECMA Inte

Edward Brito Diaz 3 Feb 12, 2022
🎩 Coverage for EcmaScript Modules

?? ESCover Coverage for EcmaScript Modules based on ?? Putout and loaders. Why another coverage tool? When you want to use ESM in Node.js without tran

coderaiser 4 Jun 10, 2022
ESLint plugin about ECMAScript syntactic features.

eslint-plugin-es-x ESLint plugin which disallows each ECMAScript syntax. Forked from eslint-plugin-es. As the original repository seems no longer main

Yosuke Ota 69 Dec 6, 2022
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 57 Dec 28, 2022
⚛️ Hooks for building fast and extendable tables and datagrids for React

Hooks for building lightweight, fast and extendable datagrids for React Enjoy this library? Try them all! React Query, React Form, React Charts Visit

Tanner Linsley 20.3k Jan 3, 2023
AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.

Please use version 1.x as prior versions has a security flaw if you use user generated data to concat your SQL strings instead of providing them as a

Andrey Gershun 6.1k Jan 9, 2023
The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.

List.js Perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on

Jonny Strömberg 10.9k Jan 1, 2023
A JQuery plugin to create AJAX based CRUD tables.

What is jTable http://www.jtable.org jTable is a jQuery plugin used to create AJAX based CRUD tables without coding HTML or Javascript. It has several

Volosoft 1.1k Dec 21, 2022
Convert a simple HTML syntax into tables compatible with Foundation for Emails.

Inky Inky is an HTML-based templating language that converts simple HTML into complex, responsive email-ready HTML. Designed for Foundation for Emails

Foundation 652 Dec 22, 2022
Live searching/filtering for HTML tables in a jQuery plugin

jQuery Filter Table Plugin This plugin will add a search filter to tables. When typing in the filter, any rows that do not contain the filter will be

Sunny Walker 175 Oct 29, 2022