• Stars
    star
    4,308
  • Rank 10,001 (Top 0.2 %)
  • Language
    HTML
  • License
    Other
  • Created over 14 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ECMAScript 5/6/7 compatibility tables

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.

More Repositories

1

html-minifier

Javascript-based HTML compressor/minifier (with Node.js support)
JavaScript
4,939
star
2

kratko.js

Simple tool to help refactor Javascript
JavaScript
266
star
3

protolicious

prototype.js tidbits
JavaScript
152
star
4

jscritic

Quickly check how well 3rd party script behaves.
JavaScript
118
star
5

osx

Customization of OS X and installation of most of my work (and other) stuff
Shell
107
star
6

textmate-js-language-syntax-file

Better JS language syntax file for Textmate
JavaScript
91
star
7

detect-global

Bookmarklet for listing global variables (helps prevent accidental leaks)
JavaScript
86
star
8

cft

Common Feature Tests
JavaScript
68
star
9

nfe

"Named function expressions demystified" article
CSS
55
star
10

html-lint

Linter that was originally part of kangax/html-minifier
JavaScript
47
star
11

jstests

Various experiments with Javascript, HTML, CSS, etc.
29
star
12

domlint

Test suite against HTML/DOM conflicts
JavaScript
27
star
13

perfectionkills.com

HTML
26
star
14

array_subclassing

Generic function to subclass array in Javascript (using ECMAScript 5 features)
JavaScript
25
star
15

iseventsupported

A function for analyzing event support in browsers (using feature detection)
JavaScript
24
star
16

proto.menu

prototype.js based context menu
JavaScript
12
star
17

safarify

Bookmarklet to display safari version numbers next to webkit build numbers in GA
JavaScript
9
star
18

ape

APE Javascript Library
JavaScript
6
star
19

es5-testsuite

ES5 conformance test suite
JavaScript
6
star
20

foxify

Bookmarklet to report percentage of Firefox users by series
6
star
21

sputniktests-webrunner

sputniktests web runner
JavaScript
6
star
22

prototype-tmbundle

6
star
23

es5-compat-table

6
star
24

colorpicker

A fork of a ColorPicker by John Dyer
JavaScript
5
star
25

js-checker

ECMAScript/DOM conformance tests
JavaScript
5
star
26

css-tidbits

4
star
27

css-navigator

CSS Navigator Textmate Bundle (unofficially hosted)
4
star
28

shouldilearnjavascript.com

shouldilearnjavascript.com
3
star
29

jquery-context-menu

CSS
3
star
30

fitocracy-data-mining

JavaScript
2
star
31

executables

My personal executable files for geektool and other purposes.
Ruby
2
star
32

es5-helpers

Various experiments with ECMAScript 5
JavaScript
2
star
33

github_issues_viewer

JavaScript
1
star