Node.js ES2015 Support

7.0.0Nightly!99% complete99% complete 6.6.099% complete99% complete 5.12.059% complete58% complete 5.11.159% complete58% complete 5.11.059% complete58% complete 4.5.057% complete54% complete 4.4.757% complete54% complete 4.4.657% complete54% complete 4.3.257% complete54% complete 0.12.1531% complete23% complete 0.10.4611% complete6% complete

optimisation

proper tail calls (tail call optimisation)

direct recursion
?
function(){
"use strict"; return (function f(n){ if (n <= 0) { return "foo"; } return f(n - 1); }(1e6)) === "foo";
}
Error
Yes
Error
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
mutual recursion
?
function(){
"use strict"; function f(n){ if (n <= 0) { return "foo"; } return g(n - 1); } function g(n){ if (n <= 0) { return "bar"; } return f(n - 1); } return f(1e6) === "foo" && f(1e6+1) === "bar";
}
Error
Yes
Error
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

syntax

default function parameters

basic functionality
?
function(){
return (function (a = 1, b = 2) { return a === 3 && b === 2; }(3));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
explicit undefined defers to the default
?
function(){
return (function (a = 1, b = 2) { return a === 1 && b === 3; }(undefined, 3));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults can refer to previous params
?
function(){
return (function (a, b = a) { return b === 5; }(5));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
arguments object interaction
?
function(){
return (function (a = "baz", b = "qux", c = "quux") { a = "corge"; // The arguments object is not mapped to the // parameters, even outside of strict mode. return arguments.length === 2 && arguments[0] === "foo" && arguments[1] === "bar"; }("foo", "bar"));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
temporal dead zone
?
function(){
return (function(x = 1) { try { eval("(function(a=a){}())"); return false; } catch(e) {} try { eval("(function(a=b,b){}())"); return false; } catch(e) {} return true; }());
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
separate scope
?
function(){
return (function(a=function(){ return typeof b === 'undefined'; }){ var b = 1; return a(); }());
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
new Function() support
?
function(){
return new Function("a = 1", "b = 2", "return a === 3 && b === 2;" )(3);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

rest parameters

basic functionality
?
function(){
return (function (foo, ...args) { return args instanceof Array && args + "" === "bar,baz"; }("foo", "bar", "baz"));
}
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
function 'length' property
?
function(){
return function(a, ...b){}.length === 1 && function(...c){}.length === 0;
}
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
arguments object interaction
?
function(){
return (function (foo, ...args) { foo = "qux"; // The arguments object is not mapped to the // parameters, even outside of strict mode. return arguments.length === 3 && arguments[0] === "foo" && arguments[1] === "bar" && arguments[2] === "baz"; }("foo", "bar", "baz"));
}
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
can't be used in setters
?
function(){
return (function (...args) { try { eval("({set e(...args){}})"); } catch(e) { return true; } }());
}
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
new Function() support
?
function(){
return new Function("a", "...b", "return b instanceof Array && a+b === 'foobar,baz';" )('foo','bar','baz');
}
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error

spread (...) operator

with arrays, in function calls
?
function(){
return Math.max(...[1, 2, 3]) === 3
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with arrays, in array literals
?
function(){
return [...[1, 2, 3]][2] === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with sparse arrays, in function calls
?
function(){
var a = Array(...[,,]); return "0" in a && "1" in a && '' + a[0] + a[1] === "undefinedundefined";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with sparse arrays, in array literals
?
function(){
var a = [...[,,]]; return "0" in a && "1" in a && '' + a[0] + a[1] === "undefinedundefined";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with strings, in function calls
?
function(){
return Math.max(..."1234") === 4;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with strings, in array literals
?
function(){
return ["a", ..."bcd", "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with astral plane strings, in function calls
?
function(){
return Array(..."𠮷𠮶")[0] === "𠮷";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with astral plane strings, in array literals
?
function(){
return [..."𠮷𠮶"][0] === "𠮷";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with generator instances, in calls
?
function(){
var iterable = (function*(){ yield 1; yield 2; yield 3; }()); return Math.max(...iterable) === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with generator instances, in arrays
?
function(){
var iterable = (function*(){ yield "b"; yield "c"; yield "d"; }()); return ["a", ...iterable, "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with generic iterables, in calls
?
function(){
var iterable = global.__createIterableObject([1, 2, 3]); return Math.max(...iterable) === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with generic iterables, in arrays
?
function(){
var iterable = global.__createIterableObject(["b", "c", "d"]); return ["a", ...iterable, "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with instances of iterables, in calls
?
function(){
var iterable = global.__createIterableObject([1, 2, 3]); return Math.max(...Object.create(iterable)) === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
with instances of iterables, in arrays
?
function(){
var iterable = global.__createIterableObject(["b", "c", "d"]); return ["a", ...Object.create(iterable), "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error
spreading non-iterables is a runtime error
?
function(){
try { Math.max(...2); } catch(e) { return Math.max(...[1, 2, 3]) === 3; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Yes
Error
Error
Error
Error

object literal extensions

computed properties
?
function(){
var x = 'y'; return ({ [x]: 1 }).y === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
shorthand properties
?
function(){
var a = 7, b = 8, c = {a,b}; return c.a === 7 && c.b === 8;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
shorthand methods
?
function(){
return ({ y() { return 2; } }).y() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
string-keyed shorthand methods
?
function(){
return ({ "foo bar"() { return 4; } })["foo bar"]() === 4;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed shorthand methods
?
function(){
var x = 'y'; return ({ [x](){ return 1 } }).y() === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed accessors
?
function(){
var x = 'y', valueSet, obj = { get [x] () { return 1 }, set [x] (value) { valueSet = value } }; obj.y = 'foo'; return obj.y === 1 && valueSet === 'foo';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error

for..of loops

with arrays
?
function(){
var arr = [5]; for (var item of arr) return item === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
with sparse arrays
?
function(){
var arr = [,,]; var count = 0; for (var item of arr) count += (item === undefined); return count === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
with strings
?
function(){
var str = ""; for (var item of "foo") str += item; return str === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
with astral plane strings
?
function(){
var str = ""; for (var item of "𠮷𠮶") str += item + " "; return str === "𠮷 𠮶 ";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
with generator instances
?
function(){
var result = ""; var iterable = (function*(){ yield 1; yield 2; yield 3; }()); for (var item of iterable) { result += item; } return result === "123";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
with generic iterables
?
function(){
var result = ""; var iterable = global.__createIterableObject([1, 2, 3]); for (var item of iterable) { result += item; } return result === "123";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
with instances of generic iterables
?
function(){
var result = ""; var iterable = global.__createIterableObject([1, 2, 3]); for (var item of Object.create(iterable)) { result += item; } return result === "123";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
iterator closing, break
?
function(){
var closed = false; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); for (var it of iter) break; return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
iterator closing, throw
?
function(){
var closed = false; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); try { for (var it of iter) throw 0; } catch(e){} return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error

octal and binary literals

octal literals
?
function(){
return 0o10 === 8 && 0O10 === 8;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
binary literals
?
function(){
return 0b10 === 2 && 0B10 === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
octal supported by Number()
?
function(){
return Number('0o1') === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
binary supported by Number()
?
function(){
return Number('0b1') === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No

template literals

basic functionality
?
function(){
var a = "ba", b = "QUX"; return `foo bar ${a + "z"} ${b.toLowerCase()}` === "foo bar\nbaz qux";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
toString conversion
?
function(){
var a = { toString: function() { return "foo"; }, valueOf: function() { return "bar"; }, }; return `${a}` === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
tagged template literals
?
function(){
var called = false; function fn(parts, a, b) { called = true; return parts instanceof Array && parts[0] === "foo" && parts[1] === "bar\n" && parts.raw[0] === "foo" && parts.raw[1] === "bar\\n" && a === 123 && b === 456; } return fn `foo${123}bar\n${456}` && called;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
passed array is frozen
?
function(){
return (function(parts) { return Object.isFrozen(parts) && Object.isFrozen(parts.raw); }) `foo${0}bar${0}baz`;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
line break normalisation
?
function(){
var cr = eval("`x" + String.fromCharCode(13) + "y`"); var lf = eval("`x" + String.fromCharCode(10) + "y`"); var crlf = eval("`x" + String.fromCharCode(13,10) + "y`"); return cr.length === 3 && lf.length === 3 && crlf.length === 3 && cr[1] === lf[1] && lf[1] === crlf[1] && crlf[1] === '\n';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error

RegExp "y" and "u" flags

"y" flag
?
function(){
var re = new RegExp('\\w', 'y'); re.exec('xy'); return (re.exec('xy')[0] === 'y');
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"y" flag, lastIndex
?
function(){
var re = new RegExp('yy', 'y'); re.lastIndex = 3; var result = re.exec('xxxyyxx')[0]; return result === 'yy' && re.lastIndex === 5;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"u" flag
?
function(){
return "𠮷".match(/^.$/u)[0].length === 2;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"u" flag, Unicode code point escapes
?
function(){
return "𝌆".match(/\u{1d306}/u)[0].length === 2;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"u" flag, case folding
?
function(){
return "ſ".match(/S/iu) && "S".match(/ſ/iu);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

destructuring, declarations

with arrays
?
function(){
var [a, , [b], c] = [5, null, [6]]; return a === 5 && b === 6 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with sparse arrays
?
function(){
var [a, , b] = [,,,]; return a === undefined && b === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with strings
?
function(){
var [a, b, c] = "ab"; return a === "a" && b === "b" && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with astral plane strings
?
function(){
var [c] = "𠮷𠮶"; return c === "𠮷";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with generator instances
?
function(){
var [a, b, c] = (function*(){ yield 1; yield 2; }()); return a === 1 && b === 2 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with generic iterables
?
function(){
var [a, b, c] = global.__createIterableObject([1, 2]); return a === 1 && b === 2 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with instances of generic iterables
?
function(){
var [a, b, c] = Object.create(global.__createIterableObject([1, 2])); return a === 1 && b === 2 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var [a, b] = iter; return closed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
trailing commas in iterable patterns
?
function(){
var [a,] = [1]; return a === 1;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with objects
?
function(){
var {c, x:d, e} = {c:7, x:8}; return c === 7 && d === 8 && e === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
object destructuring with primitives
?
function(){
var {toFixed} = 2; var {slice} = ''; return toFixed === Number.prototype.toFixed && slice === String.prototype.slice;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
trailing commas in object patterns
?
function(){
var {a,} = {a:1}; return a === 1;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
throws on null and undefined
?
function(){
try { var {a} = null; return false; } catch(e) { if (!(e instanceof TypeError)) return false; } try { var {b} = undefined; return false; } catch(e) { if (!(e instanceof TypeError)) return false; } return true;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
computed properties
?
function(){
var qux = "corge"; var { [qux]: grault } = { corge: "garply" }; return grault === "garply";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
multiples in a single var statement
?
function(){
var [a,b] = [5,6], {c,d} = {c:7,d:8}; return a === 5 && b === 6 && c === 7 && d === 8;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
nested
?
function(){
var [e, {x:f, g}] = [9, {x:10}]; var {h, x:[i]} = {h:11, x:[12]}; return e === 9 && f === 10 && g === undefined && h === 11 && i === 12;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
in for-in loop heads
?
function(){
for(var [i, j, k] in { qux: 1 }) { return i === "q" && j === "u" && k === "x"; }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
in for-of loop heads
?
function(){
for(var [i, j, k] of [[1,2,3]]) { return i === 1 && j === 2 && k === 3; }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
in catch heads
?
function(){
try { throw [1,2]; } catch([i,j]) { try { throw { k: 3, l: 4 }; } catch({k, l}) { return i === 1 && j === 2 && k === 3 && l === 4; } }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
rest
?
function(){
var [a, ...b] = [3, 4, 5]; var [c, ...d] = [6]; return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults
?
function(){
var {a = 1, b = 0, z:c = 3} = {b:2, z:undefined}; var [d = 0, e = 5, f = 6] = [4,,undefined]; return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults, let temporal dead zone
?
function(){
var {a, b = 2} = {a:1}; try { eval("let {c = c} = {};"); return false; } catch(e){} try { eval("let {c = d, d} = {d:1};"); return false; } catch(e){} return a === 1 && b === 2;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

destructuring, assignment

with arrays
?
function(){
var a,b,c; [a, , [b], c] = [5, null, [6]]; return a === 5 && b === 6 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with sparse arrays
?
function(){
var a, b; [a, , b] = [,,,]; return a === undefined && b === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with strings
?
function(){
var a,b,c; [a, b, c] = "ab"; return a === "a" && b === "b" && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with astral plane strings
?
function(){
var c; [c] = "𠮷𠮶"; return c === "𠮷";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with generator instances
?
function(){
var a,b,c; [a, b, c] = (function*(){ yield 1; yield 2; }()); return a === 1 && b === 2 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with generic iterables
?
function(){
var a,b,c; [a, b, c] = global.__createIterableObject([1, 2]); return a === 1 && b === 2 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with instances of generic iterables
?
function(){
var a,b,c; [a, b, c] = Object.create(global.__createIterableObject([1, 2])); return a === 1 && b === 2 && c === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var a,b; [a, b] = iter; return closed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
iterable destructuring expression
?
function(){
var a, b, iterable = [1,2]; return ([a, b] = iterable) === iterable;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
chained iterable destructuring
?
function(){
var a,b,c,d; [a,b] = [c,d] = [1,2]; return a === 1 && b === 2 && c === 1 && d === 2;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
trailing commas in iterable patterns
?
function(){
var a; [a,] = [1]; return a === 1;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with objects
?
function(){
var c,d,e; ({c, x:d, e} = {c:7, x:8}); return c === 7 && d === 8 && e === undefined;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
object destructuring with primitives
?
function(){
var toFixed, slice; ({toFixed} = 2); ({slice} = ''); return toFixed === Number.prototype.toFixed && slice === String.prototype.slice;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
trailing commas in object patterns
?
function(){
var a; ({a,} = {a:1}); return a === 1;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
object destructuring expression
?
function(){
var a, b, obj = { a:1, b:2 }; return ({a,b} = obj) === obj;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
parenthesised left-hand-side is a syntax error
?
function(){
var a, b; ({a,b} = {a:1,b:2}); try { eval("({a,b}) = {a:3,b:4};"); } catch(e) { return a === 1 && b === 2; }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
chained object destructuring
?
function(){
var a,b,c,d; ({a,b} = {c,d} = {a:1,b:2,c:3,d:4}); return a === 1 && b === 2 && c === 3 && d === 4;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
throws on null and undefined
?
function(){
var a,b; try { ({a} = null); return false; } catch(e) { if (!(e instanceof TypeError)) return false; } try { ({b} = undefined); return false; } catch(e) { if (!(e instanceof TypeError)) return false; } return true;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
computed properties
?
function(){
var grault, qux = "corge"; ({ [qux]: grault } = { corge: "garply" }); return grault === "garply";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
nested
?
function(){
var e,f,g,h,i; [e, {x:f, g}] = [9, {x:10}]; ({h, x:[i]} = {h:11, x:[12]}); return e === 9 && f === 10 && g === undefined && h === 11 && i === 12;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
rest
?
function(){
var a,b,c,d; [a, ...b] = [3, 4, 5]; [c, ...d] = [6]; return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
nested rest
?
function(){
var a = [1, 2, 3], first, last; [first, ...[a[2], last]] = a; return first === 1 && last === 3 && (a + "") === "1,2,2";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
empty patterns
?
function(){
[] = [1,2]; ({} = {a:1,b:2}); return true;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults
?
function(){
var a,b,c,d,e,f; ({a = 1, b = 0, z:c = 3} = {b:2, z:undefined}); [d = 0, e = 5, f = 6] = [4,,undefined]; return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

destructuring, parameters

with arrays
?
function(){
return function([a, , [b], c]) { return a === 5 && b === 6 && c === undefined; }([5, null, [6]]);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with sparse arrays
?
function(){
return function([a, , b]) { return a === undefined && b === undefined; }([,,,]);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with strings
?
function(){
return function([a, b, c]) { return a === "a" && b === "b" && c === undefined; }("ab");
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with astral plane strings
?
function(){
return function([c]) { return c === "𠮷"; }("𠮷𠮶");
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with generator instances
?
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === undefined; }(function*(){ yield 1; yield 2; }());
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with generic iterables
?
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === undefined; }(global.__createIterableObject([1, 2]));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with instances of generic iterables
?
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === undefined; }(Object.create(global.__createIterableObject([1, 2])));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); (function([a,b]) {}(iter)); return closed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
trailing commas in iterable patterns
?
function(){
return function([a,]) { return a === 1; }([1]);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
with objects
?
function(){
return function({c, x:d, e}) { return c === 7 && d === 8 && e === undefined; }({c:7, x:8});
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
object destructuring with primitives
?
function(){
return function({toFixed}, {slice}) { return toFixed === Number.prototype.toFixed && slice === String.prototype.slice; }(2,'');
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
trailing commas in object patterns
?
function(){
return function({a,}) { return a === 1; }({a:1});
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
throws on null and undefined
?
function(){
try { (function({a}){}(null)); return false; } catch(e) {} try { (function({b}){}(undefined)); return false; } catch(e) {} return true;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
computed properties
?
function(){
var qux = "corge"; return function({ [qux]: grault }) { return grault === "garply"; }({ corge: "garply" });
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
nested
?
function(){
return function([e, {x:f, g}], {h, x:[i]}) { return e === 9 && f === 10 && g === undefined && h === 11 && i === 12; }([9, {x:10}],{h:11, x:[12]});
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
'arguments' interaction
?
function(){
return (function({a, x:b, y:e}, [c, d]) { return arguments[0].a === 1 && arguments[0].x === 2 && !("y" in arguments[0]) && arguments[1] + '' === "3,4"; }({a:1, x:2}, [3, 4]));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
new Function() support
?
function(){
return new Function("{a, x:b, y:e}","[c, d]", "return a === 1 && b === 2 && c === 3 && " + "d === 4 && e === undefined;" )({a:1, x:2}, [3, 4]);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
in parameters, function 'length' property
?
function(){
return function({a, b}, [c, d]){}.length === 2;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
rest
?
function(){
return function([a, ...b], [c, ...d]) { return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0; }([3, 4, 5], [6]);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
empty patterns
?
function(){
return function ([],{}){ return arguments[0] + '' === "3,4" && arguments[1].x === "foo"; }([3,4],{x:"foo"});
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults
?
function(){
return (function({a = 1, b = 0, c = 3, x:d = 0, y:e = 5}, [f = 6, g = 0, h = 8]) { return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6 && g === 7 && h === 8; }({b:2, c:undefined, x:4},[, 7, undefined]));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults, separate scope
?
function(){
return (function({a=function(){ return typeof b === 'undefined'; }}){ var b = 1; return a(); }({}));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
defaults, new Function() support
?
function(){
return new Function("{a = 1, b = 0, c = 3, x:d = 0, y:e = 5}", "return a === 1 && b === 2 && c === 3 && d === 4 && e === 5;" )({b:2, c:undefined, x:4});
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

Unicode code point escapes

in strings
?
function(){
return '\u{1d306}' == '\ud834\udf06';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
in identifiers
?
function(){
var \u{102C0} = { \u{102C0} : 2 }; return \u{102C0}['\ud800\udec0'] === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error

new.target

in constructors
?
function(){
var passed = false; new function f() { passed = (new.target === f); }(); (function() { passed &= (new.target === undefined); }()); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
assignment is an early error
?
function(){
var passed = false; new function f() { passed = (new.target === f); }(); try { Function("new.target = function(){};"); } catch(e) { return passed; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

bindings

const

basic support
?
function(){
const foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
is block-scoped
?
function(){
const bar = 123; { const bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
cannot be in statements
?
function(){
const bar = 1; try { Function("if(true) const baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
Error
No
redefining a const is an error
?
function(){
const baz = 1; try { Function("const foo = 1; foo = 2;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
Error
No
for loop statement scope
?
function(){
const baz = 1; for(const baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for-in loop iteration scope
?
function(){
var scopes = []; for(const i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
for-of loop iteration scope
?
function(){
var scopes = []; for(const i of ['a','b']) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
temporal dead zone
?
function(){
var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } const qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
basic support (strict mode)
?
function(){
"use strict"; const foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
is block-scoped (strict mode)
?
function(){
'use strict'; const bar = 123; { const bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
cannot be in statements (strict mode)
?
function(){
'use strict'; const bar = 1; try { Function("'use strict'; if(true) const baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
redefining a const (strict mode)
?
function(){
'use strict'; const baz = 1; try { Function("'use strict'; const foo = 1; foo = 2;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for loop statement scope (strict mode)
?
function(){
'use strict'; const baz = 1; for(const baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for-in loop iteration scope (strict mode)
?
function(){
'use strict'; var scopes = []; for(const i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
for-of loop iteration scope (strict mode)
?
function(){
'use strict'; var scopes = []; for(const i of ['a','b']) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
temporal dead zone (strict mode)
?
function(){
'use strict'; var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } const qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes

let

basic support
?
function(){
let foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
is block-scoped
?
function(){
let bar = 123; { let bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
cannot be in statements
?
function(){
let bar = 1; try { Function("if(true) let baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for loop statement scope
?
function(){
let baz = 1; for(let baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
temporal dead zone
?
function(){
var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } let qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for/for-in loop iteration scope
?
function(){
let scopes = []; for(let i = 0; i < 2; i++) { scopes.push(function(){ return i; }); } let passed = (scopes[0]() === 0 && scopes[1]() === 1); scopes = []; for(let i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } passed &= (scopes[0]() === "a" && scopes[1]() === "b"); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
No
basic support (strict mode)
?
function(){
'use strict'; let foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
is block-scoped (strict mode)
?
function(){
'use strict'; let bar = 123; { let bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
cannot be in statements (strict mode)
?
function(){
'use strict'; let bar = 1; try { Function("'use strict'; if(true) let baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for loop statement scope (strict mode)
?
function(){
'use strict'; let baz = 1; for(let baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
temporal dead zone (strict mode)
?
function(){
'use strict'; var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } let qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes
for/for-in loop iteration scope (strict mode)
?
function(){
'use strict'; let scopes = []; for(let i = 0; i < 2; i++) { scopes.push(function(){ return i; }); } let passed = (scopes[0]() === 0 && scopes[1]() === 1); scopes = []; for(let i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } passed &= (scopes[0]() === "a" && scopes[1]() === "b"); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
No

block-level function declaration
?
function(){
'use strict'; if (f() !== 1) return false; function f() { return 1; } { if (f() !== 2) return false; function f() { return 2; } if (f() !== 2) return false; } if (f() !== 1) return false; return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Yes

functions

arrow functions

0 parameters
?
function(){
return (() => 5)() === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
1 parameter, no brackets
?
function(){
var b = x => x + "foo"; return (b("fee fie foe ") === "fee fie foe foo");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
multiple parameters
?
function(){
var c = (v, w, x, y, z) => "" + v + w + x + y + z; return (c(6, 5, 4, 3, 2) === "65432");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
lexical "this" binding
?
function(){
var d = { x : "bar", y : function() { return z => this.x + z; }}.y(); var e = { x : "baz", y : d }; return d("ley") === "barley" && e.y("ley") === "barley";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
"this" unchanged by call or apply
?
function(){
var d = { x : "foo", y : function() { return () => this.x; }}; var e = { x : "bar" }; return d.y().call(e) === "foo" && d.y().apply(e) === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
can't be bound, can be curried
?
function(){
var d = { x : "bar", y : function() { return z => this.x + z; }}; var e = { x : "baz" }; return d.y().bind(e, "ley")() === "barley";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
lexical "arguments" binding
?
function(){
var f = (function() { return z => arguments[0]; }(5)); return f(6) === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
no line break between params and =>
?
function(){
return (() => { try { Function("x\n => 2")(); } catch(e) { return true; } })();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
correct precedence
?
function(){
return (() => { try { Function("0 || () => 2")(); } catch(e) { return true; } })();
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
Error
Error
no "prototype" property
?
function(){
var a = () => 5; return !a.hasOwnProperty("prototype");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
lexical "super" binding in constructors
?
function(){
var received; class B { constructor (arg) { received = arg; } } class C extends B { constructor () { var callSuper = () => super('foo'); callSuper(); } } return new C instanceof C && received === 'foo'
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
lexical "super" binding in methods
?
function(){
class B { qux() { return "quux"; } } class C extends B { baz() { return x => super.qux(); } } var arrow = new C().baz(); return arrow() === "quux";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
lexical "new.target" binding
?
function(){
function C() { return x => new.target; } return new C()() === C && C()() === undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

class

class statement
?
function(){
class C {} return typeof C === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
is block-scoped
?
function(){
class C {} var c1 = C; { class C {} var c2 = C; } return C === c1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
class expression
?
function(){
return typeof class C {} === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
anonymous class
?
function(){
return typeof class {} === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
constructor
?
function(){
class C { constructor() { this.x = 1; } } return C.prototype.constructor === C && new C().x === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
prototype methods
?
function(){
class C { method() { return 2; } } return typeof C.prototype.method === "function" && new C().method() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
string-keyed methods
?
function(){
class C { "foo bar"() { return 2; } } return typeof C.prototype["foo bar"] === "function" && new C()["foo bar"]() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed prototype methods
?
function(){
var foo = "method"; class C { [foo]() { return 2; } } return typeof C.prototype.method === "function" && new C().method() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
optional semicolons
?
function(){
class C { ; method() { return 2; }; method2() { return 2; } method3() { return 2; }; } return typeof C.prototype.method === "function" && typeof C.prototype.method2 === "function" && typeof C.prototype.method3 === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
static methods
?
function(){
class C { static method() { return 3; } } return typeof C.method === "function" && C.method() === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed static methods
?
function(){
var foo = "method"; class C { static [foo]() { return 3; } } return typeof C.method === "function" && C.method() === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
accessor properties
?
function(){
var baz = false; class C { get foo() { return "foo"; } set bar(x) { baz = x; } } new C().bar = true; return new C().foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed accessor properties
?
function(){
var garply = "foo", grault = "bar", baz = false; class C { get [garply]() { return "foo"; } set [grault](x) { baz = x; } } new C().bar = true; return new C().foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
static accessor properties
?
function(){
var baz = false; class C { static get foo() { return "foo"; } static set bar(x) { baz = x; } } C.bar = true; return C.foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed static accessor properties
?
function(){
var garply = "foo", grault = "bar", baz = false; class C { static get [garply]() { return "foo"; } static set [grault](x) { baz = x; } } C.bar = true; return C.foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
class name is lexically scoped
?
function(){
class C { method() { return typeof C === "function"; } } var M = C.prototype.method; C = undefined; return C === undefined && M();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed names, temporal dead zone
?
function(){
try { var B = class C { [C](){} } } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
methods aren't enumerable
?
function(){
class C { foo() {} static bar() {} } return !C.prototype.propertyIsEnumerable("foo") && !C.propertyIsEnumerable("bar");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
implicit strict mode
?
function(){
class C { static method() { return this === undefined; } } return (0,C.method)();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
constructor requires new
?
function(){
class C {} try { C(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
extends
?
function(){
class B {} class C extends B {} return new C() instanceof B && B.isPrototypeOf(C);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
extends expressions
?
function(){
var B; class C extends (B = class {}) {} return new C() instanceof B && B.isPrototypeOf(C);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
extends null
?
function(){
class C extends null { constructor() { return Object.create(null); } } return Function.prototype.isPrototypeOf(C) && Object.getPrototypeOf(C.prototype) === null;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
new.target
?
function(){
var passed = false; new function f() { passed = new.target === f; }(); class A { constructor() { passed &= new.target === B; } } class B extends A {} new B(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

super

statement in constructors
?
function(){
var passed = false; class B { constructor(a) { passed = (a === "barbaz"); } } class C extends B { constructor(a) { super("bar" + a); } } new C("baz"); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
expression in constructors
?
function(){
class B { constructor(a) { return ["foo" + a]; } } class C extends B { constructor(a) { return super("bar" + a); } } return new C("baz")[0] === "foobarbaz";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
in methods, property access
?
function(){
class B {} B.prototype.qux = "foo"; B.prototype.corge = "baz"; class C extends B { quux(a) { return super.qux + a + super["corge"]; } } C.prototype.qux = "garply"; return new C().quux("bar") === "foobarbaz";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
in methods, method calls
?
function(){
class B { qux(a) { return "foo" + a; } } class C extends B { qux(a) { return super.qux("bar" + a); } } return new C().qux("baz") === "foobarbaz";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
method calls use correct "this" binding
?
function(){
class B { qux(a) { return this.foo + a; } } class C extends B { qux(a) { return super.qux("bar" + a); } } var obj = new C(); obj.foo = "foo"; return obj.qux("baz") === "foobarbaz";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
constructor calls use correct "new.target" binding
?
function(){
var passed; class B { constructor() { passed = (new.target === C); } } class C extends B { constructor() { super(); } } new C(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
is statically bound
?
function(){
class B { qux() { return "bar"; } } class C extends B { qux() { return super.qux() + this.corge; } } var obj = { qux: C.prototype.qux, corge: "ley" }; return obj.qux() === "barley";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
super() invokes the correct constructor
?
function(){
// checks that super() is *not* a synonym of super.constructor() var passed; class B { constructor() { passed = true; } }; B.prototype.constructor = function () { passed = false; }; class C extends B { }; new C; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error

generators

basic functionality
?
function(){
function * generator(){ yield 5; yield 6; }; var iterator = generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
generator function expressions
?
function(){
var generator = function * (){ yield 5; yield 6; }; var iterator = generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
correct "this" binding
?
function(){
function * generator(){ yield this.x; yield this.y; }; var iterator = { g: generator, x: 5, y: 6 }.g(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
can't use "this" with new
?
function(){
function * generator(){ yield this.x; yield this.y; }; try { (new generator()).next(); } catch (e) { return true; }
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
Error
Error
sending
?
function(){
var sent; function * generator(){ sent = [yield 5, yield 6]; }; var iterator = generator(); iterator.next(); iterator.next("foo"); iterator.next("bar"); return sent[0] === "foo" && sent[1] === "bar";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
%GeneratorPrototype%
?
function(){
function * generatorFn(){} var ownProto = Object.getPrototypeOf(generatorFn()); var passed = ownProto === generatorFn.prototype; var sharedProto = Object.getPrototypeOf(ownProto); passed &= sharedProto !== Object.prototype && sharedProto === Object.getPrototypeOf(function*(){}.prototype) && sharedProto.hasOwnProperty('next'); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
%GeneratorPrototype% prototype chain
?
function(){
function * generatorFn(){} var g = generatorFn(); var ownProto = Object.getPrototypeOf(g); var passed = ownProto === generatorFn.prototype; var sharedProto = Object.getPrototypeOf(ownProto); var iterProto = Object.getPrototypeOf(sharedProto); passed &= iterProto.hasOwnProperty(Symbol.iterator) && !sharedProto .hasOwnProperty(Symbol.iterator) && !ownProto .hasOwnProperty(Symbol.iterator) && g[Symbol.iterator]() === g; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
%GeneratorPrototype%.constructor
?
function(){
function * g (){} var iterator = new g.constructor("a","b","c","yield a; yield b; yield c;")(5,6,7); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === 7 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; passed &= g.constructor === (function*(){}).constructor; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
%GeneratorPrototype%.throw
?
function(){
var passed = false; function * generator(){ try { yield 5; yield 6; } catch(e) { passed = (e === "foo"); } }; var iterator = generator(); iterator.next(); iterator.throw("foo"); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
%GeneratorPrototype%.return
?
function(){
function * generator(){ yield 5; yield 6; }; var iterator = generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.return("quxquux"); passed &= item.value === "quxquux" && item.done === true; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
yield operator precedence
?
function(){
var passed; function * generator(){ passed = yield 0 ? true : false; }; var iterator = generator(); iterator.next(); iterator.next(true); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, arrays
?
function(){
var iterator = (function * generator() { yield * [5, 6]; }()); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, sparse arrays
?
function(){
var iterator = (function * generator() { yield * [,,]; }()); var item = iterator.next(); var passed = item.value === undefined && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, strings
?
function(){
var iterator = (function * generator() { yield * "56"; }()); var item = iterator.next(); var passed = item.value === "5" && item.done === false; item = iterator.next(); passed &= item.value === "6" && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, astral plane strings
?
function(){
var iterator = (function * generator() { yield * "𠮷𠮶"; }()); var item = iterator.next(); var passed = item.value === "𠮷" && item.done === false; item = iterator.next(); passed &= item.value === "𠮶" && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, generator instances
?
function(){
var iterator = (function * generator() { yield * (function*(){ yield 5; yield 6; yield 7; }()); }()); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === 7 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, generic iterables
?
function(){
var iterator = (function * generator() { yield * global.__createIterableObject([5, 6, 7]); }()); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === 7 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, instances of iterables
?
function(){
var iterator = (function * generator() { yield * Object.create(__createIterableObject([5, 6, 7])); }()); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === 7 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield * on non-iterables is a runtime error
?
function(){
var iterator = (function * generator() { yield * [5]; }()); var item = iterator.next(); var passed = item.value === 5 && item.done === false; iterator = (function * generator() { yield * 5; }()); try { iterator.next(); } catch (e) { return passed; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Error
Error
yield *, iterator closing
?
function(){
var closed = ''; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed += 'a'; return {done: true}; } }); var gen = (function* generator(){ try { yield *iter; } finally { closed += 'b'; } })(); gen.next(); gen['return'](); return closed === 'ab';
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
yield *, iterator closing via throw()
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'throw': undefined, 'return': function() { closed = true; return {done: true}; } }); var gen = (function*(){ try { yield *iter; } catch(e){} })(); gen.next(); gen['throw'](); return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
Error
Error
shorthand generator methods
?
function(){
var o = { * generator() { yield 5; yield 6; }, }; var iterator = o.generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
string-keyed shorthand generator methods
?
function(){
var o = { * "foo bar"() { yield 5; yield 6; }, }; var iterator = o["foo bar"](); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed shorthand generators
?
function(){
var garply = "generator"; var o = { * [garply] () { yield 5; yield 6; }, }; var iterator = o.generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
shorthand generator methods, classes
?
function(){
class C { * generator() { yield 5; yield 6; } }; var iterator = new C().generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
computed shorthand generators, classes
?
function(){
var garply = "generator"; class C { * [garply] () { yield 5; yield 6; } } var iterator = new C().generator(); var item = iterator.next(); var passed = item.value === 5 && item.done === false; item = iterator.next(); passed &= item.value === 6 && item.done === false; item = iterator.next(); passed &= item.value === undefined && item.done === true; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
shorthand generators can't be constructors
?
function(){
class C { * generator() { yield 5; yield 6; } }; try { Function("class D { * constructor() { return {}; } }"); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error

built-ins

typed arrays

Int8Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Int8Array(buffer); view[0] = 0x80; return view[0] === -0x80;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Uint8Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Uint8Array(buffer); view[0] = 0x100; return view[0] === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Uint8ClampedArray
?
function(){
var buffer = new ArrayBuffer(64); var view = new Uint8ClampedArray(buffer); view[0] = 0x100; return view[0] === 0xFF;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Int16Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Int16Array(buffer); view[0] = 0x8000; return view[0] === -0x8000;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Uint16Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Uint16Array(buffer); view[0] = 0x10000; return view[0] === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Int32Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Int32Array(buffer); view[0] = 0x80000000; return view[0] === -0x80000000;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Uint32Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Uint32Array(buffer); view[0] = 0x100000000; return view[0] === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Float32Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Float32Array(buffer); view[0] = 0.1; return view[0] === 0.10000000149011612;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Float64Array
?
function(){
var buffer = new ArrayBuffer(64); var view = new Float64Array(buffer); view[0] = 0.1; return view[0] === 0.1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Int8)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setInt8 (0, 0x80); return view.getInt8(0) === -0x80;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Uint8)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setUint8(0, 0x100); return view.getUint8(0) === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Int16)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setInt16(0, 0x8000); return view.getInt16(0) === -0x8000;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Uint16)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setUint16(0, 0x10000); return view.getUint16(0) === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Int32)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setInt32(0, 0x80000000); return view.getInt32(0) === -0x80000000;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Uint32)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setUint32(0, 0x100000000); return view.getUint32(0) === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Float32)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setFloat32(0, 0.1); return view.getFloat32(0) === 0.10000000149011612;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DataView (Float64)
?
function(){
var buffer = new ArrayBuffer(64); var view = new DataView(buffer); view.setFloat64(0, 0.1); return view.getFloat64(0) === 0.1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
ArrayBuffer[Symbol.species]
?
function(){
return typeof ArrayBuffer[Symbol.species] === 'function';
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
constructors require new
?
function(){
var buffer = new ArrayBuffer(64); var constructors = [ 'ArrayBuffer', 'DataView', 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array' ]; return constructors.every(function (constructor) { try { if (constructor in global) { global[constructor](constructor === "ArrayBuffer" ? 64 : buffer); } return false; } catch(e) { return true; } });
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
constructors accept generic iterables
?
function(){
var constructors = [ 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array' ]; for(var i = 0; i < constructors.length; i++){ var arr = new global[constructors[i]](__createIterableObject([1, 2, 3])); if(arr.length !== 3 || arr[0] !== 1 || arr[1] !== 2 || arr[2] !== 3)return false; } return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
correct prototype chains
?
function(){
var constructors = [ 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array' ]; var constructor = Object.getPrototypeOf(Int8Array); var prototype = Object.getPrototypeOf(Int8Array.prototype); if(constructor === Function.prototype || prototype === Object.prototype)return false; for(var i = 0; i < constructors.length; i+=1) { if (!(constructors[i] in global && Object.getPrototypeOf(global[constructors[i]]) === constructor && Object.getPrototypeOf(global[constructors[i]].prototype) === prototype && Object.getOwnPropertyNames(global[constructors[i]].prototype).sort() + '' === "BYTES_PER_ELEMENT,constructor")) { return false; } } return true;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
%TypedArray%.from
?
function(){
return typeof Int8Array.from === "function" && typeof Uint8Array.from === "function" && typeof Uint8ClampedArray.from === "function" && typeof Int16Array.from === "function" && typeof Uint16Array.from === "function" && typeof Int32Array.from === "function" && typeof Uint32Array.from === "function" && typeof Float32Array.from === "function" && typeof Float64Array.from === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.of
?
function(){
return typeof Int8Array.of === "function" && typeof Uint8Array.of === "function" && typeof Uint8ClampedArray.of === "function" && typeof Int16Array.of === "function" && typeof Uint16Array.of === "function" && typeof Int32Array.of === "function" && typeof Uint32Array.of === "function" && typeof Float32Array.of === "function" && typeof Float64Array.of === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.subarray
?
function(){
return typeof Int8Array.prototype.subarray === "function" && typeof Uint8Array.prototype.subarray === "function" && typeof Uint8ClampedArray.prototype.subarray === "function" && typeof Int16Array.prototype.subarray === "function" && typeof Uint16Array.prototype.subarray === "function" && typeof Int32Array.prototype.subarray === "function" && typeof Uint32Array.prototype.subarray === "function" && typeof Float32Array.prototype.subarray === "function" && typeof Float64Array.prototype.subarray === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
%TypedArray%.prototype.join
?
function(){
return typeof Int8Array.prototype.join === "function" && typeof Uint8Array.prototype.join === "function" && typeof Uint8ClampedArray.prototype.join === "function" && typeof Int16Array.prototype.join === "function" && typeof Uint16Array.prototype.join === "function" && typeof Int32Array.prototype.join === "function" && typeof Uint32Array.prototype.join === "function" && typeof Float32Array.prototype.join === "function" && typeof Float64Array.prototype.join === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.indexOf
?
function(){
return typeof Int8Array.prototype.indexOf === "function" && typeof Uint8Array.prototype.indexOf === "function" && typeof Uint8ClampedArray.prototype.indexOf === "function" && typeof Int16Array.prototype.indexOf === "function" && typeof Uint16Array.prototype.indexOf === "function" && typeof Int32Array.prototype.indexOf === "function" && typeof Uint32Array.prototype.indexOf === "function" && typeof Float32Array.prototype.indexOf === "function" && typeof Float64Array.prototype.indexOf === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.lastIndexOf
?
function(){
return typeof Int8Array.prototype.lastIndexOf === "function" && typeof Uint8Array.prototype.lastIndexOf === "function" && typeof Uint8ClampedArray.prototype.lastIndexOf === "function" && typeof Int16Array.prototype.lastIndexOf === "function" && typeof Uint16Array.prototype.lastIndexOf === "function" && typeof Int32Array.prototype.lastIndexOf === "function" && typeof Uint32Array.prototype.lastIndexOf === "function" && typeof Float32Array.prototype.lastIndexOf === "function" && typeof Float64Array.prototype.lastIndexOf === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.slice
?
function(){
return typeof Int8Array.prototype.slice === "function" && typeof Uint8Array.prototype.slice === "function" && typeof Uint8ClampedArray.prototype.slice === "function" && typeof Int16Array.prototype.slice === "function" && typeof Uint16Array.prototype.slice === "function" && typeof Int32Array.prototype.slice === "function" && typeof Uint32Array.prototype.slice === "function" && typeof Float32Array.prototype.slice === "function" && typeof Float64Array.prototype.slice === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.every
?
function(){
return typeof Int8Array.prototype.every === "function" && typeof Uint8Array.prototype.every === "function" && typeof Uint8ClampedArray.prototype.every === "function" && typeof Int16Array.prototype.every === "function" && typeof Uint16Array.prototype.every === "function" && typeof Int32Array.prototype.every === "function" && typeof Uint32Array.prototype.every === "function" && typeof Float32Array.prototype.every === "function" && typeof Float64Array.prototype.every === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.filter
?
function(){
return typeof Int8Array.prototype.filter === "function" && typeof Uint8Array.prototype.filter === "function" && typeof Uint8ClampedArray.prototype.filter === "function" && typeof Int16Array.prototype.filter === "function" && typeof Uint16Array.prototype.filter === "function" && typeof Int32Array.prototype.filter === "function" && typeof Uint32Array.prototype.filter === "function" && typeof Float32Array.prototype.filter === "function" && typeof Float64Array.prototype.filter === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.forEach
?
function(){
return typeof Int8Array.prototype.forEach === "function" && typeof Uint8Array.prototype.forEach === "function" && typeof Uint8ClampedArray.prototype.forEach === "function" && typeof Int16Array.prototype.forEach === "function" && typeof Uint16Array.prototype.forEach === "function" && typeof Int32Array.prototype.forEach === "function" && typeof Uint32Array.prototype.forEach === "function" && typeof Float32Array.prototype.forEach === "function" && typeof Float64Array.prototype.forEach === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.map
?
function(){
return typeof Int8Array.prototype.map === "function" && typeof Uint8Array.prototype.map === "function" && typeof Uint8ClampedArray.prototype.map === "function" && typeof Int16Array.prototype.map === "function" && typeof Uint16Array.prototype.map === "function" && typeof Int32Array.prototype.map === "function" && typeof Uint32Array.prototype.map === "function" && typeof Float32Array.prototype.map === "function" && typeof Float64Array.prototype.map === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.reduce
?
function(){
return typeof Int8Array.prototype.reduce === "function" && typeof Uint8Array.prototype.reduce === "function" && typeof Uint8ClampedArray.prototype.reduce === "function" && typeof Int16Array.prototype.reduce === "function" && typeof Uint16Array.prototype.reduce === "function" && typeof Int32Array.prototype.reduce === "function" && typeof Uint32Array.prototype.reduce === "function" && typeof Float32Array.prototype.reduce === "function" && typeof Float64Array.prototype.reduce === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.reduceRight
?
function(){
return typeof Int8Array.prototype.reduceRight === "function" && typeof Uint8Array.prototype.reduceRight === "function" && typeof Uint8ClampedArray.prototype.reduceRight === "function" && typeof Int16Array.prototype.reduceRight === "function" && typeof Uint16Array.prototype.reduceRight === "function" && typeof Int32Array.prototype.reduceRight === "function" && typeof Uint32Array.prototype.reduceRight === "function" && typeof Float32Array.prototype.reduceRight === "function" && typeof Float64Array.prototype.reduceRight === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.reverse
?
function(){
return typeof Int8Array.prototype.reverse === "function" && typeof Uint8Array.prototype.reverse === "function" && typeof Uint8ClampedArray.prototype.reverse === "function" && typeof Int16Array.prototype.reverse === "function" && typeof Uint16Array.prototype.reverse === "function" && typeof Int32Array.prototype.reverse === "function" && typeof Uint32Array.prototype.reverse === "function" && typeof Float32Array.prototype.reverse === "function" && typeof Float64Array.prototype.reverse === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.some
?
function(){
return typeof Int8Array.prototype.some === "function" && typeof Uint8Array.prototype.some === "function" && typeof Uint8ClampedArray.prototype.some === "function" && typeof Int16Array.prototype.some === "function" && typeof Uint16Array.prototype.some === "function" && typeof Int32Array.prototype.some === "function" && typeof Uint32Array.prototype.some === "function" && typeof Float32Array.prototype.some === "function" && typeof Float64Array.prototype.some === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.sort
?
function(){
return typeof Int8Array.prototype.sort === "function" && typeof Uint8Array.prototype.sort === "function" && typeof Uint8ClampedArray.prototype.sort === "function" && typeof Int16Array.prototype.sort === "function" && typeof Uint16Array.prototype.sort === "function" && typeof Int32Array.prototype.sort === "function" && typeof Uint32Array.prototype.sort === "function" && typeof Float32Array.prototype.sort === "function" && typeof Float64Array.prototype.sort === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.copyWithin
?
function(){
return typeof Int8Array.prototype.copyWithin === "function" && typeof Uint8Array.prototype.copyWithin === "function" && typeof Uint8ClampedArray.prototype.copyWithin === "function" && typeof Int16Array.prototype.copyWithin === "function" && typeof Uint16Array.prototype.copyWithin === "function" && typeof Int32Array.prototype.copyWithin === "function" && typeof Uint32Array.prototype.copyWithin === "function" && typeof Float32Array.prototype.copyWithin === "function" && typeof Float64Array.prototype.copyWithin === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.find
?
function(){
return typeof Int8Array.prototype.find === "function" && typeof Uint8Array.prototype.find === "function" && typeof Uint8ClampedArray.prototype.find === "function" && typeof Int16Array.prototype.find === "function" && typeof Uint16Array.prototype.find === "function" && typeof Int32Array.prototype.find === "function" && typeof Uint32Array.prototype.find === "function" && typeof Float32Array.prototype.find === "function" && typeof Float64Array.prototype.find === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.findIndex
?
function(){
return typeof Int8Array.prototype.findIndex === "function" && typeof Uint8Array.prototype.findIndex === "function" && typeof Uint8ClampedArray.prototype.findIndex === "function" && typeof Int16Array.prototype.findIndex === "function" && typeof Uint16Array.prototype.findIndex === "function" && typeof Int32Array.prototype.findIndex === "function" && typeof Uint32Array.prototype.findIndex === "function" && typeof Float32Array.prototype.findIndex === "function" && typeof Float64Array.prototype.findIndex === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.fill
?
function(){
return typeof Int8Array.prototype.fill === "function" && typeof Uint8Array.prototype.fill === "function" && typeof Uint8ClampedArray.prototype.fill === "function" && typeof Int16Array.prototype.fill === "function" && typeof Uint16Array.prototype.fill === "function" && typeof Int32Array.prototype.fill === "function" && typeof Uint32Array.prototype.fill === "function" && typeof Float32Array.prototype.fill === "function" && typeof Float64Array.prototype.fill === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
%TypedArray%.prototype.keys
?
function(){
return typeof Int8Array.prototype.keys === "function" && typeof Uint8Array.prototype.keys === "function" && typeof Uint8ClampedArray.prototype.keys === "function" && typeof Int16Array.prototype.keys === "function" && typeof Uint16Array.prototype.keys === "function" && typeof Int32Array.prototype.keys === "function" && typeof Uint32Array.prototype.keys === "function" && typeof Float32Array.prototype.keys === "function" && typeof Float64Array.prototype.keys === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
%TypedArray%.prototype.values
?
function(){
return typeof Int8Array.prototype.values === "function" && typeof Uint8Array.prototype.values === "function" && typeof Uint8ClampedArray.prototype.values === "function" && typeof Int16Array.prototype.values === "function" && typeof Uint16Array.prototype.values === "function" && typeof Int32Array.prototype.values === "function" && typeof Uint32Array.prototype.values === "function" && typeof Float32Array.prototype.values === "function" && typeof Float64Array.prototype.values === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
%TypedArray%.prototype.entries
?
function(){
return typeof Int8Array.prototype.entries === "function" && typeof Uint8Array.prototype.entries === "function" && typeof Uint8ClampedArray.prototype.entries === "function" && typeof Int16Array.prototype.entries === "function" && typeof Uint16Array.prototype.entries === "function" && typeof Int32Array.prototype.entries === "function" && typeof Uint32Array.prototype.entries === "function" && typeof Float32Array.prototype.entries === "function" && typeof Float64Array.prototype.entries === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
%TypedArray%.prototype[Symbol.iterator]
?
function(){
return typeof Int8Array.prototype[Symbol.iterator] === "function" && typeof Uint8Array.prototype[Symbol.iterator] === "function" && typeof Uint8ClampedArray.prototype[Symbol.iterator] === "function" && typeof Int16Array.prototype[Symbol.iterator] === "function" && typeof Uint16Array.prototype[Symbol.iterator] === "function" && typeof Int32Array.prototype[Symbol.iterator] === "function" && typeof Uint32Array.prototype[Symbol.iterator] === "function" && typeof Float32Array.prototype[Symbol.iterator] === "function" && typeof Float64Array.prototype[Symbol.iterator] === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
%TypedArray%[Symbol.species]
?
function(){
return typeof Int8Array[Symbol.species] === "function" && typeof Uint8Array[Symbol.species] === "function" && typeof Uint8ClampedArray[Symbol.species] === "function" && typeof Int16Array[Symbol.species] === "function" && typeof Uint16Array[Symbol.species] === "function" && typeof Int32Array[Symbol.species] === "function" && typeof Uint32Array[Symbol.species] === "function" && typeof Float32Array[Symbol.species] === "function" && typeof Float64Array[Symbol.species] === "function";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error

Map

basic functionality
?
function(){
var key = {}; var map = new Map(); map.set(key, 123); return map.has(key) && map.get(key) === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
constructor arguments
?
function(){
var key1 = {}; var key2 = {}; var map = new Map([[key1, 123], [key2, 456]]); return map.has(key1) && map.get(key1) === 123 && map.has(key2) && map.get(key2) === 456;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
constructor requires new
?
function(){
new Map(); try { Map(); return false; } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
constructor accepts null
?
function(){
new Map(null); return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
constructor invokes set
?
function(){
var passed = false; var _set = Map.prototype.set; Map.prototype.set = function(k, v) { passed = true; }; new Map([ [1, 2] ]); Map.prototype.set = _set; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); try { new Map(iter); } catch(e){} return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Map.prototype.set returns this
?
function(){
var map = new Map(); return map.set(0, 0) === map;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
-0 key converts to +0
?
function(){
var map = new Map(); map.set(-0, "foo"); var k; map.forEach(function (value, key) { k = 1 / key; }); return k === Infinity && map.get(+0) == "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Map.prototype.size
?
function(){
var key = {}; var map = new Map(); map.set(key, 123); return map.size === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Map.prototype.delete
?
function(){
return typeof Map.prototype.delete === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Map.prototype.clear
?
function(){
return typeof Map.prototype.clear === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Map.prototype.forEach
?
function(){
return typeof Map.prototype.forEach === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Map.prototype.keys
?
function(){
return typeof Map.prototype.keys === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Map.prototype.values
?
function(){
return typeof Map.prototype.values === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Map.prototype.entries
?
function(){
return typeof Map.prototype.entries === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Map.prototype[Symbol.iterator]
?
function(){
return typeof Map.prototype[Symbol.iterator] === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Map.prototype isn't an instance
?
function(){
new Map(); var obj = {}; try { Map.prototype.has(obj); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Map iterator prototype chain
?
function(){
// Iterator instance var iterator = new Map()[Symbol.iterator](); // %MapIteratorPrototype% var proto1 = Object.getPrototypeOf(iterator); // %IteratorPrototype% var proto2 = Object.getPrototypeOf(proto1); return proto2.hasOwnProperty(Symbol.iterator) && !proto1 .hasOwnProperty(Symbol.iterator) && !iterator .hasOwnProperty(Symbol.iterator) && iterator[Symbol.iterator]() === iterator;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Map[Symbol.species]
?
function(){
var prop = Object.getOwnPropertyDescriptor(Map, Symbol.species); return 'get' in prop && Map[Symbol.species] === Map;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

Set

basic functionality
?
function(){
var obj = {}; var set = new Set(); set.add(123); set.add(123); return set.has(123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
constructor arguments
?
function(){
var obj1 = {}; var obj2 = {}; var set = new Set([obj1, obj2]); return set.has(obj1) && set.has(obj2);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
constructor requires new
?
function(){
new Set(); try { Set(); return false; } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
constructor accepts null
?
function(){
new Set(null); return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
constructor invokes add
?
function(){
var passed = false; var _add = Set.prototype.add; Set.prototype.add = function(v) { passed = true; }; new Set([1]); Set.prototype.add = _add; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var add = Set.prototype.add; Set.prototype.add = function(){ throw 0 }; try { new Set(iter); } catch(e){} Set.prototype.add = add; return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
Set.prototype.add returns this
?
function(){
var set = new Set(); return set.add(0) === set;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
-0 key converts to +0
?
function(){
var set = new Set(); set.add(-0); var k; set.forEach(function (value) { k = 1 / value; }); return k === Infinity && set.has(+0);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Set.prototype.size
?
function(){
var obj = {}; var set = new Set(); set.add(123); set.add(123); set.add(456); return set.size === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Set.prototype.delete
?
function(){
return typeof Set.prototype.delete === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Set.prototype.clear
?
function(){
return typeof Set.prototype.clear === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Set.prototype.forEach
?
function(){
return typeof Set.prototype.forEach === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Set.prototype.keys
?
function(){
return typeof Set.prototype.keys === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Set.prototype.values
?
function(){
return typeof Set.prototype.values === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Set.prototype.entries
?
function(){
return typeof Set.prototype.entries === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Set.prototype[Symbol.iterator]
?
function(){
return typeof Set.prototype[Symbol.iterator] === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Set.prototype isn't an instance
?
function(){
new Set(); var obj = {}; try { Set.prototype.has(obj); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
Set iterator prototype chain
?
function(){
// Iterator instance var iterator = new Set()[Symbol.iterator](); // %SetIteratorPrototype% var proto1 = Object.getPrototypeOf(iterator); // %IteratorPrototype% var proto2 = Object.getPrototypeOf(proto1); return proto2.hasOwnProperty(Symbol.iterator) && !proto1 .hasOwnProperty(Symbol.iterator) && !iterator .hasOwnProperty(Symbol.iterator) && iterator[Symbol.iterator]() === iterator;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Set[Symbol.species]
?
function(){
var prop = Object.getOwnPropertyDescriptor(Set, Symbol.species); return 'get' in prop && Set[Symbol.species] === Set;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

WeakMap

basic functionality
?
function(){
var key = {}; var weakmap = new WeakMap(); weakmap.set(key, 123); return weakmap.has(key) && weakmap.get(key) === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
constructor arguments
?
function(){
var key1 = {}; var key2 = {}; var weakmap = new WeakMap([[key1, 123], [key2, 456]]); return weakmap.has(key1) && weakmap.get(key1) === 123 && weakmap.has(key2) && weakmap.get(key2) === 456;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
constructor requires new
?
function(){
new WeakMap(); try { WeakMap(); return false; } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
constructor accepts null
?
function(){
new WeakMap(null); return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
constructor invokes set
?
function(){
var passed = false; var _set = WeakMap.prototype.set; WeakMap.prototype.set = function(k, v) { passed = true; }; new WeakMap([ [{ }, 42] ]); WeakMap.prototype.set = _set; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
frozen objects as keys
?
function(){
var f = Object.freeze({}); var m = new WeakMap; m.set(f, 42); return m.get(f) === 42;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); try { new WeakMap(iter); } catch(e){} return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
WeakMap.prototype.set returns this
?
function(){
var weakmap = new WeakMap(); var key = {}; return weakmap.set(key, 0) === weakmap;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
WeakMap.prototype.delete
?
function(){
return typeof WeakMap.prototype.delete === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes
no WeakMap.prototype.clear method
?
function(){
if (!("clear" in WeakMap.prototype)) { return true; } var m = new WeakMap(); var key = {}; m.set(key, 2); m.clear(); return m.has(key);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Yes
.has, .get and .delete methods accept primitives
?
function(){
var m = new WeakMap; return m.has(1) === false && m.get(1) === undefined && m.delete(1) === false;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
WeakMap.prototype isn't an instance
?
function(){
new WeakMap(); var obj = {}; try { WeakMap.prototype.has(obj); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Yes

WeakSet

basic functionality
?
function(){
var obj1 = {}; var weakset = new WeakSet(); weakset.add(obj1); weakset.add(obj1); return weakset.has(obj1);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
constructor arguments
?
function(){
var obj1 = {}, obj2 = {}; var weakset = new WeakSet([obj1, obj2]); return weakset.has(obj1) && weakset.has(obj2);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
constructor requires new
?
function(){
new WeakSet(); try { WeakSet(); return false; } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
constructor accepts null
?
function(){
new WeakSet(null); return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
constructor invokes add
?
function(){
var passed = false; var _add = WeakSet.prototype.add; WeakSet.prototype.add = function(v) { passed = true; }; new WeakSet([ { } ]); WeakSet.prototype.add = _add; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); try { new WeakSet(iter); } catch(e){} return closed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
WeakSet.prototype.add returns this
?
function(){
var weakset = new WeakSet(); var obj = {}; return weakset.add(obj) === weakset;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
WeakSet.prototype.delete
?
function(){
return typeof WeakSet.prototype.delete === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
no WeakSet.prototype.clear method
?
function(){
if (!("clear" in WeakSet.prototype)) { return true; } var s = new WeakSet(); var key = {}; s.add(key); s.clear(); return s.has(key);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
.has and .delete methods accept primitives
?
function(){
var s = new WeakSet; return s.has(1) === false && s.delete(1) === false;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
WeakSet.prototype isn't an instance
?
function(){
new WeakSet(); var obj = {}; try { WeakSet.prototype.has(obj); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error

Proxy

constructor requires new
?
function(){
new Proxy({}, {}); try { Proxy({}, {}); return false; } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
no "prototype" property
?
function(){
new Proxy({}, {}); return !Proxy.hasOwnProperty('prototype');
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"get" handler
?
function(){
var proxied = { }; var proxy = new Proxy(proxied, { get: function (t, k, r) { return t === proxied && k === "foo" && r === proxy && 5; } }); return proxy.foo === 5;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"get" handler, instances of proxies
?
function(){
var proxied = { }; var proxy = Object.create(new Proxy(proxied, { get: function (t, k, r) { return t === proxied && k === "foo" && r === proxy && 5; } })); return proxy.foo === 5;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"get" handler invariants
?
function(){
var passed = false; var proxied = { }; var proxy = new Proxy(proxied, { get: function () { passed = true; return 4; } }); // The value reported for a property must be the same as the value of the corresponding // target object property if the target object property is a non-writable, // non-configurable own data property. Object.defineProperty(proxied, "foo", { value: 5, enumerable: true }); try { proxy.foo; return false; } catch(e) {} // The value reported for a property must be undefined if the corresponding target // object property is a non-configurable own accessor property that has undefined // as its [[Get]] attribute. Object.defineProperty(proxied, "bar", { set: function(){}, enumerable: true }); try { proxy.bar; return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"set" handler
?
function(){
var proxied = { }; var passed = false; var proxy = new Proxy(proxied, { set: function (t, k, v, r) { passed = t === proxied && k + v === "foobar" && r === proxy; } }); proxy.foo = "bar"; return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"set" handler, instances of proxies
?
function(){
var proxied = { }; var passed = false; var proxy = Object.create(new Proxy(proxied, { set: function (t, k, v, r) { passed = t === proxied && k + v === "foobar" && r === proxy; } })); proxy.foo = "bar"; return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"set" handler invariants
?
function(){
var passed = false; new Proxy({},{}); // Cannot change the value of a property to be different from the value of // the corresponding target object if the corresponding target object // property is a non-writable, non-configurable own data property. var proxied = {}; var proxy = new Proxy(proxied, { set: function () { passed = true; return true; } }); Object.defineProperty(proxied, "foo", { value: 2, enumerable: true }); proxy.foo = 2; try { proxy.foo = 4; return false; } catch(e) {} // Cannot set the value of a property if the corresponding target // object property is a non-configurable own accessor property // that has undefined as its [[Set]] attribute. Object.defineProperty(proxied, "bar", { get: function(){}, enumerable: true }); try { proxy.bar = 2; return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"has" handler
?
function(){
var proxied = {}; var passed = false; "foo" in new Proxy(proxied, { has: function (t, k) { passed = t === proxied && k === "foo"; } }); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"has" handler, instances of proxies
?
function(){
var proxied = {}; var passed = false; "foo" in Object.create(new Proxy(proxied, { has: function (t, k) { passed = t === proxied && k === "foo"; } })); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"has" handler invariants
?
function(){
var passed = false; new Proxy({},{}); // A property cannot be reported as non-existent, if it exists as a // non-configurable own property of the target object. var proxied = {}; var proxy = new Proxy(proxied, { has: function () { passed = true; return false; } }); Object.defineProperty(proxied, "foo", { value: 2, writable: true, enumerable: true }); try { 'foo' in proxy; return false; } catch(e) {} // A property cannot be reported as non-existent, if it exists as an // own property of the target object and the target object is not extensible. proxied.bar = 2; Object.preventExtensions(proxied); try { 'bar' in proxy; return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"deleteProperty" handler
?
function(){
var proxied = {}; var passed = false; delete new Proxy(proxied, { deleteProperty: function (t, k) { passed = t === proxied && k === "foo"; } }).foo; return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"deleteProperty" handler invariant
?
function(){
var passed = false; new Proxy({},{}); // A property cannot be reported as deleted, if it exists as a non-configurable // own property of the target object. var proxied = {}; Object.defineProperty(proxied, "foo", { value: 2, writable: true, enumerable: true }); try { delete new Proxy(proxied, { deleteProperty: function () { passed = true; return true; } }).foo; return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"getOwnPropertyDescriptor" handler
?
function(){
var proxied = {}; var fakeDesc = { value: "foo", configurable: true }; var returnedDesc = Object.getOwnPropertyDescriptor( new Proxy(proxied, { getOwnPropertyDescriptor: function (t, k) { return t === proxied && k === "foo" && fakeDesc; } }), "foo" ); return (returnedDesc.value === fakeDesc.value && returnedDesc.configurable === fakeDesc.configurable && returnedDesc.writable === false && returnedDesc.enumerable === false);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"getOwnPropertyDescriptor" handler invariants
?
function(){
var passed = false; new Proxy({},{}); // A property cannot be reported as non-existent, if it exists as a non-configurable // own property of the target object. var proxied = {}; var proxy = new Proxy(proxied, { getOwnPropertyDescriptor: function () { passed = true; return undefined; } }); Object.defineProperty(proxied, "foo", { value: 2, writable: true, enumerable: true }); try { Object.getOwnPropertyDescriptor(proxy, "foo"); return false; } catch(e) {} // A property cannot be reported as non-existent, if it exists as an own property // of the target object and the target object is not extensible. proxied.bar = 3; Object.preventExtensions(proxied); try { Object.getOwnPropertyDescriptor(proxy, "bar"); return false; } catch(e) {} // A property cannot be reported as existent, if it does not exists as an own property // of the target object and the target object is not extensible. try { Object.getOwnPropertyDescriptor(new Proxy(proxied, { getOwnPropertyDescriptor: function() { return { value: 2, configurable: true, writable: true, enumerable: true }; }}), "baz"); return false; } catch(e) {} // A property cannot be reported as non-configurable, if it does not exists as an own // property of the target object or if it exists as a configurable own property of // the target object. try { Object.getOwnPropertyDescriptor(new Proxy({}, { getOwnPropertyDescriptor: function() { return { value: 2, configurable: false, writable: true, enumerable: true }; }}), "baz"); return false; } catch(e) {} try { Object.getOwnPropertyDescriptor(new Proxy({baz:1}, { getOwnPropertyDescriptor: function() { return { value: 1, configurable: false, writable: true, enumerable: true }; }}), "baz"); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"defineProperty" handler
?
function(){
var proxied = {}; var passed = false; Object.defineProperty( new Proxy(proxied, { defineProperty: function (t, k, d) { passed = t === proxied && k === "foo" && d.value === 5; return true; } }), "foo", { value: 5, configurable: true } ); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"defineProperty" handler invariants
?
function(){
var passed = false; new Proxy({},{}); // A property cannot be added, if the target object is not extensible. var proxied = Object.preventExtensions({}); var proxy = new Proxy(proxied, { defineProperty: function() { passed = true; return true; } }); try { Object.defineProperty(proxy, "foo", { value: 2 }); return false; } catch(e) {} // A property cannot be non-configurable, unless there exists a corresponding // non-configurable own property of the target object. try { Object.defineProperty( new Proxy({ bar: true }, { defineProperty: function () { return true; } }), "bar", { value: 5, configurable: false, writable: true, enumerable: true } ); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"getPrototypeOf" handler
?
function(){
var proxied = {}; var fakeProto = {}; var proxy = new Proxy(proxied, { getPrototypeOf: function (t) { return t === proxied && fakeProto; } }); return Object.getPrototypeOf(proxy) === fakeProto;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"getPrototypeOf" handler invariant
?
function(){
var passed = false; new Proxy({},{}); // If the target object is not extensible, [[GetPrototypeOf]] applied to the proxy object // must return the same value as [[GetPrototypeOf]] applied to the proxy object's target object. try { Object.getPrototypeOf(new Proxy(Object.preventExtensions({}), { getPrototypeOf: function () { passed = true; return {}; } })); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"setPrototypeOf" handler
?
function(){
var proxied = {}; var newProto = {}; var passed = false; Object.setPrototypeOf( new Proxy(proxied, { setPrototypeOf: function (t, p) { passed = t === proxied && p === newProto; return true; } }), newProto ); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"setPrototypeOf" handler invariant
?
function(){
var passed = false; new Proxy({},{}); Object.setPrototypeOf({},{}); // If the target object is not extensible, the argument value must be the // same as the result of [[GetPrototypeOf]] applied to target object. try { Object.setPrototypeOf( new Proxy(Object.preventExtensions({}), { setPrototypeOf: function () { passed = true; return true; } }),{}); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"isExtensible" handler
?
function(){
var proxied = {}; var passed = false; Object.isExtensible( new Proxy(proxied, { isExtensible: function (t) { passed = t === proxied; return true; } }) ); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"isExtensible" handler invariant
?
function(){
var passed = false; new Proxy({},{}); // [[IsExtensible]] applied to the proxy object must return the same value // as [[IsExtensible]] applied to the proxy object's target object with the same argument. try { Object.isExtensible(new Proxy({}, { isExtensible: function (t) { passed = true; return false; } })); return false; } catch(e) {} try { Object.isExtensible(new Proxy(Object.preventExtensions({}), { isExtensible: function (t) { return true; } })); return false; } catch(e) {} return true;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"preventExtensions" handler
?
function(){
var proxied = {}; var passed = false; Object.preventExtensions( new Proxy(proxied, { preventExtensions: function (t) { passed = t === proxied; return Object.preventExtensions(proxied); } }) ); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"preventExtensions" handler invariant
?
function(){
var passed = false; new Proxy({},{}); // [[PreventExtensions]] applied to the proxy object only returns true // if [[IsExtensible]] applied to the proxy object's target object is false. try { Object.preventExtensions(new Proxy({}, { preventExtensions: function () { passed = true; return true; } })); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"ownKeys" handler
?
function(){
var proxied = {}; var passed = false; Object.keys( new Proxy(proxied, { ownKeys: function (t) { passed = t === proxied; return []; } }) ); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"ownKeys" handler invariant
?
function(){
var passed = false; new Proxy({},{}); // The Type of each result List element is either String or Symbol. try { Object.keys(new Proxy({}, { ownKeys: function () { passed = true; return [2]; }})); return false; } catch(e) {} // The result List must contain the keys of all non-configurable own properties of the target object. var proxied = {}; Object.defineProperty(proxied, "foo", { value: 2, writable: true, enumerable: true }); try { Object.keys(new Proxy(proxied, { ownKeys: function () { return []; }})); return false; } catch(e) {} // If the target object is not extensible, then the result List must contain all the keys // of the own properties of the target object and no other values. try { Object.keys(new Proxy(Object.preventExtensions({b:1}), { ownKeys: function () { return ['a']; }})); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"apply" handler
?
function(){
var proxied = function(){}; var passed = false; var host = { method: new Proxy(proxied, { apply: function (t, thisArg, args) { passed = t === proxied && thisArg === host && args + "" === "foo,bar"; } }) }; host.method("foo", "bar"); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"apply" handler invariant
?
function(){
var passed = false; new Proxy(function(){}, { apply: function () { passed = true; } })(); // A Proxy exotic object only has a [[Call]] internal method if the // initial value of its [[ProxyTarget]] internal slot is an object // that has a [[Call]] internal method. try { new Proxy({}, { apply: function () {} })(); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"construct" handler
?
function(){
var proxied = function(){}; var passed = false; new new Proxy(proxied, { construct: function (t, args) { passed = t === proxied && args + "" === "foo,bar"; return {}; } })("foo","bar"); return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
"construct" handler invariants
?
function(){
var passed = false; new Proxy({},{}); // A Proxy exotic object only has a [[Construct]] internal method if the // initial value of its [[ProxyTarget]] internal slot is an object // that has a [[Construct]] internal method. try { new new Proxy({}, { construct: function (t, args) { return {}; } })(); return false; } catch(e) {} // The result of [[Construct]] must be an Object. try { new new Proxy(function(){}, { construct: function (t, args) { passed = true; return 5; } })(); return false; } catch(e) {} return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Proxy.revocable
?
function(){
var obj = Proxy.revocable({}, { get: function() { return 5; } }); var passed = (obj.proxy.foo === 5); obj.revoke(); try { obj.proxy.foo; } catch(e) { passed &= e instanceof TypeError; } return passed;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Array.isArray support
?
function(){
return Array.isArray(new Proxy([], {}));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
JSON.stringify support
?
function(){
return JSON.stringify(new Proxy(['foo'], {})) === '["foo"]';
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

Reflect

Reflect.get
?
function(){
return Reflect.get({ qux: 987 }, "qux") === 987;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.set
?
function(){
var obj = {}; Reflect.set(obj, "quux", 654); return obj.quux === 654;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.has
?
function(){
return Reflect.has({ qux: 987 }, "qux");
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.deleteProperty
?
function(){
var obj = { bar: 456 }; Reflect.deleteProperty(obj, "bar"); return !("bar" in obj);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.getOwnPropertyDescriptor
?
function(){
var obj = { baz: 789 }; var desc = Reflect.getOwnPropertyDescriptor(obj, "baz"); return desc.value === 789 && desc.configurable && desc.writable && desc.enumerable;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.defineProperty
?
function(){
var obj = {}; Reflect.defineProperty(obj, "foo", { value: 123 }); return obj.foo === 123 && Reflect.defineProperty(Object.freeze({}), "foo", { value: 123 }) === false;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.getPrototypeOf
?
function(){
return Reflect.getPrototypeOf([]) === Array.prototype;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.setPrototypeOf
?
function(){
var obj = {}; Reflect.setPrototypeOf(obj, Array.prototype); return obj instanceof Array;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.isExtensible
?
function(){
return Reflect.isExtensible({}) && !Reflect.isExtensible(Object.preventExtensions({}));
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.preventExtensions
?
function(){
var obj = {}; Reflect.preventExtensions(obj); return !Object.isExtensible(obj);
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.ownKeys, string keys
?
function(){
var obj = Object.create({ C: true }); obj.A = true; Object.defineProperty(obj, 'B', { value: true, enumerable: false }); return Reflect.ownKeys(obj).sort() + '' === "A,B";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.ownKeys, symbol keys
?
function(){
var s1 = Symbol(), s2 = Symbol(), s3 = Symbol(); var proto = {}; proto[s1] = true; var obj = Object.create(proto); obj[s2] = true; Object.defineProperty(obj, s3, { value: true, enumerable: false }); var keys = Reflect.ownKeys(obj); return keys.indexOf(s2) >-1 && keys.indexOf(s3) >-1 && keys.length === 2;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.apply
?
function(){
return Reflect.apply(Array.prototype.push, [1,2], [3,4,5]) === 5;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct
?
function(){
return Reflect.construct(function(a, b, c) { this.qux = a + b + c; }, ["foo", "bar", "baz"]).qux === "foobarbaz";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct sets new.target meta-property
?
function(){
return Reflect.construct(function(a, b, c) { if (new.target === Object) { this.qux = a + b + c; } }, ["foo", "bar", "baz"], Object).qux === "foobarbaz";
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct creates instances from third argument
?
function(){
function F(){} var obj = Reflect.construct(function(){ this.y = 1; }, [], F); return obj.y === 1 && obj instanceof F;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct, Array subclassing
?
function(){
function F(){} var obj = Reflect.construct(Array, [], F); obj[2] = 'foo'; return obj.length === 3 && obj instanceof F;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct, RegExp subclassing
?
function(){
function F(){} var obj = Reflect.construct(RegExp, ["baz","g"], F); return RegExp.prototype.exec.call(obj, "foobarbaz")[0] === "baz" && obj.lastIndex === 9 && obj instanceof F;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct, Function subclassing
?
function(){
function F(){} var obj = Reflect.construct(Function, ["return 2"], F); return obj() === 2 && obj instanceof F;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Reflect.construct, Promise subclassing
?
function(){
function F(){} var p1 = Reflect.construct(Promise,[function(resolve, reject) { resolve("foo"); }], F); var p2 = Reflect.construct(Promise,[function(resolve, reject) { reject("quux"); }], F); var score = +(p1 instanceof F && p2 instanceof F); function thenFn(result) { score += (result === "foo"); check(); } function catchFn(result) { score += (result === "quux"); check(); } function shouldNotRun(result) { score = -Infinity; } p1.then = p2.then = Promise.prototype.then; p1.catch = p2.catch = Promise.prototype.catch; p1.then(thenFn, shouldNotRun); p2.then(shouldNotRun, catchFn); p1.catch(shouldNotRun); p2.catch(catchFn); function check() { if (score === 4) asyncTestPassed(); }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

Promise

basic functionality
?
function(){
var p1 = new Promise(function(resolve, reject) { resolve("foo"); }); var p2 = new Promise(function(resolve, reject) { reject("quux"); }); var score = 0; function thenFn(result) { score += (result === "foo"); check(); } function catchFn(result) { score += (result === "quux"); check(); } function shouldNotRun(result) { score = -Infinity; } p1.then(thenFn, shouldNotRun); p2.then(shouldNotRun, catchFn); p1.catch(shouldNotRun); p2.catch(catchFn); p1.then(function() { // Promise.prototype.then() should return a new Promise score += p1.then() !== p1; check(); }); function check() { if (score === 4) asyncTestPassed(); }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
constructor requires new
?
function(){
new Promise(function(){}); try { Promise(function(){}); return false; } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Promise.prototype isn't an instance
?
function(){
new Promise(function(){}); try { Promise.prototype.then(function(){}); } catch (e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Promise.all
?
function(){
var fulfills = Promise.all([ new Promise(function(resolve) { setTimeout(resolve,2000,"foo"); }), new Promise(function(resolve) { setTimeout(resolve,1000,"bar"); }), ]); var rejects = Promise.all([ new Promise(function(_, reject) { setTimeout(reject, 2000,"baz"); }), new Promise(function(_, reject) { setTimeout(reject, 1000,"qux"); }), ]); var score = 0; fulfills.then(function(result) { score += (result + "" === "foo,bar"); check(); }); rejects.catch(function(result) { score += (result === "qux"); check(); }); function check() { if (score === 2) asyncTestPassed(); }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Promise.all, generic iterables
?
function(){
var fulfills = Promise.all(global.__createIterableObject([ new Promise(function(resolve) { setTimeout(resolve,2000,"foo"); }), new Promise(function(resolve) { setTimeout(resolve,1000,"bar"); }), ])); var rejects = Promise.all(global.__createIterableObject([ new Promise(function(_, reject) { setTimeout(reject, 2000,"baz"); }), new Promise(function(_, reject) { setTimeout(reject, 1000,"qux"); }), ])); var score = 0; fulfills.then(function(result) { score += (result + "" === "foo,bar"); check(); }); rejects.catch(function(result) { score += (result === "qux"); check(); }); function check() { if (score === 2) asyncTestPassed(); }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Promise.race
?
function(){
var fulfills = Promise.race([ new Promise(function(resolve) { setTimeout(resolve,1000,"foo"); }), new Promise(function(_, reject) { setTimeout(reject, 2000,"bar"); }), ]); var rejects = Promise.race([ new Promise(function(_, reject) { setTimeout(reject, 1000,"baz"); }), new Promise(function(resolve) { setTimeout(resolve,2000,"qux"); }), ]); var score = 0; fulfills.then(function(result) { score += (result === "foo"); check(); }); rejects.catch(function(result) { score += (result === "baz"); check(); }); function check() { if (score === 2) asyncTestPassed(); }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Promise.race, generic iterables
?
function(){
var fulfills = Promise.race(global.__createIterableObject([ new Promise(function(resolve) { setTimeout(resolve,1000,"foo"); }), new Promise(function(_, reject) { setTimeout(reject, 2000,"bar"); }), ])); var rejects = Promise.race(global.__createIterableObject([ new Promise(function(_, reject) { setTimeout(reject, 1000,"baz"); }), new Promise(function(resolve) { setTimeout(resolve,2000,"qux"); }), ])); var score = 0; fulfills.then(function(result) { score += (result === "foo"); check(); }); rejects.catch(function(result) { score += (result === "baz"); check(); }); function check() { if (score === 2) asyncTestPassed(); }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Promise[Symbol.species]
?
function(){
var prop = Object.getOwnPropertyDescriptor(Promise, Symbol.species); return 'get' in prop && Promise[Symbol.species] === Promise;
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error

Symbol

basic functionality
?
function(){
var object = {}; var symbol = Symbol(); var value = {}; object[symbol] = value; return object[symbol] === value;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
typeof support
?
function(){
return typeof Symbol() === "symbol";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
symbol keys are hidden to pre-ES6 code
?
function(){
var object = {}; var symbol = Symbol(); object[symbol] = 1; for (var x in object){} var passed = !x; if (Object.keys && Object.getOwnPropertyNames) { passed &= Object.keys(object).length === 0 && Object.getOwnPropertyNames(object).length === 0; } return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Object.defineProperty support
?
function(){
var object = {}; var symbol = Symbol(); var value = {}; if (Object.defineProperty) { Object.defineProperty(object, symbol, { value: value }); return object[symbol] === value; } return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
symbols inherit from Symbol.prototype
?
function(){
var symbol = Symbol(); var passed = symbol.foo === undefined; Symbol.prototype.foo = 2; passed &= symbol.foo === 2; delete Symbol.prototype.foo; return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
cannot coerce to string or number
?
function(){
var symbol = Symbol(); try { symbol + ""; return false; } catch(e) {} try { symbol + 0; return false; } catch(e) {} return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
can convert with String()
?
function(){
return String(Symbol("foo")) === "Symbol(foo)";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
new Symbol() throws
?
function(){
var symbol = Symbol(); try { new Symbol(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Object(symbol)
?
function(){
var symbol = Symbol(); var symbolObject = Object(symbol); return typeof symbolObject === "object" && symbolObject instanceof Symbol && symbolObject == symbol && symbolObject !== symbol && symbolObject.valueOf() === symbol;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
JSON.stringify ignores symbol primitives
?
function(){
var object = { foo: Symbol() }; object[Symbol()] = 1; var array = [Symbol()]; return JSON.stringify(object) === '{}' && JSON.stringify(array) === '[null]' && JSON.stringify(Symbol()) === undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
JSON.stringify ignores symbol objects
?
function(){
var testSymbolObject = function (sym) { var object = { foo: sym }; try { // some browsers throw a TypeError when setting symbol object keys. // this isn't part of this test, so, ignore it if so. object[sym] = 1; } catch (e) {} // some browsers throw a TypeError when setting symbol object keys. var array = [sym]; return JSON.stringify(object) === '{"foo":{}}' && JSON.stringify(array) === '[{}]' && JSON.stringify(sym) === '{}'; }; var objSym = Object(Symbol()); var symNoToJSON = Object(Symbol()); Object.defineProperty(symNoToJSON, 'toJSON', { enumerable: false, value: null }); // ensure it overrides the prototype, but is not callable return testSymbolObject(objSym) && testSymbolObject(symNoToJSON);
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
global symbol registry
?
function(){
var symbol = Symbol.for('foo'); return Symbol.for('foo') === symbol && Symbol.keyFor(symbol) === 'foo';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error

well-known symbols

Symbol.hasInstance
?
function(){
var passed = false; var obj = { foo: true }; var C = function(){}; Object.defineProperty(C, Symbol.hasInstance, { value: function(inst) { passed = inst.foo; return false; } }); obj instanceof C; return passed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.isConcatSpreadable
?
function(){
var a = [], b = []; b[Symbol.isConcatSpreadable] = false; a = a.concat(b); return a[0] === b;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.iterator, existence
?
function(){
return "iterator" in Symbol;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Symbol.iterator, arguments object
?
function(){
return (function() { return typeof arguments[Symbol.iterator] === 'function' && Object.hasOwnProperty.call(arguments, Symbol.iterator); }());
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Symbol.species, existence
?
function(){
return "species" in Symbol;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, Array.prototype.concat
?
function(){
var obj = []; obj.constructor = {}; obj.constructor[Symbol.species] = function() { return { foo: 1 }; }; return Array.prototype.concat.call(obj, []).foo === 1;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, Array.prototype.filter
?
function(){
var obj = []; obj.constructor = {}; obj.constructor[Symbol.species] = function() { return { foo: 1 }; }; return Array.prototype.filter.call(obj, Boolean).foo === 1;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, Array.prototype.map
?
function(){
var obj = []; obj.constructor = {}; obj.constructor[Symbol.species] = function() { return { foo: 1 }; }; return Array.prototype.map.call(obj, Boolean).foo === 1;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, Array.prototype.slice
?
function(){
var obj = []; obj.constructor = {}; obj.constructor[Symbol.species] = function() { return { foo: 1 }; }; return Array.prototype.slice.call(obj, 0).foo === 1;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, Array.prototype.splice
?
function(){
var obj = []; obj.constructor = {}; obj.constructor[Symbol.species] = function() { return { foo: 1 }; }; return Array.prototype.splice.call(obj, 0).foo === 1;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, RegExp.prototype[Symbol.split]
?
function(){
var passed = false; var obj = { constructor: {} }; obj[Symbol.split] = RegExp.prototype[Symbol.split]; obj.constructor[Symbol.species] = function() { passed = true; return /./; }; "".split(obj); return passed;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.species, Promise.prototype.then
?
function(){
var promise = new Promise(function(resolve){ resolve(42); }); var FakePromise1 = promise.constructor = function(exec){ exec(function(){}, function(){}); }; var FakePromise2 = function(exec){ exec(function(){}, function(){}); }; Object.defineProperty(FakePromise1, Symbol.species, {value: FakePromise2}); return promise.then(function(){}) instanceof FakePromise2;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.replace
?
function(){
var O = {}; O[Symbol.replace] = function(){ return 42; }; return ''.replace(O) === 42;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.search
?
function(){
var O = {}; O[Symbol.search] = function(){ return 42; }; return ''.search(O) === 42;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.split
?
function(){
var O = {}; O[Symbol.split] = function(){ return 42; }; return ''.split(O) === 42;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.match
?
function(){
var O = {}; O[Symbol.match] = function(){ return 42; }; return ''.match(O) === 42;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.match, RegExp constructor
?
function(){
var re = /./; re[Symbol.match] = false; var foo = {constructor: RegExp}; foo[Symbol.match] = true; return RegExp(re) !== re && RegExp(foo) === foo;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.match, String.prototype.startsWith
?
function(){
var re = /./; try { '/./'.startsWith(re); } catch(e){ re[Symbol.match] = false; return '/./'.startsWith(re); }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Symbol.match, String.prototype.endsWith
?
function(){
var re = /./; try { '/./'.endsWith(re); } catch(e){ re[Symbol.match] = false; return '/./'.endsWith(re); }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Symbol.match, String.prototype.includes
?
function(){
var re = /./; try { '/./'.includes(re); } catch(e){ re[Symbol.match] = false; return '/./'.includes(re); }
}
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Symbol.toPrimitive
?
function(){
var a = {}, b = {}, c = {}; var passed = 0; a[Symbol.toPrimitive] = function(hint) { passed += hint === "number"; return 0; }; b[Symbol.toPrimitive] = function(hint) { passed += hint === "string"; return 0; }; c[Symbol.toPrimitive] = function(hint) { passed += hint === "default"; return 0; }; a >= 0; b in {}; c == 0; return passed === 3;
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Symbol.toStringTag
?
function(){
var a = {}; a[Symbol.toStringTag] = "foo"; return (a + "") === "[object foo]";
}
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
No
Error
Error
Symbol.toStringTag affects existing built-ins
?
function(){
var s = Symbol.toStringTag; var passed = true; [ [Array.prototype, []], [String.prototype, ''], [arguments, arguments], [Function.prototype, function(){}], [Error.prototype, new Error()], [Boolean.prototype, true], [Number.prototype, 2], [Date.prototype, new Date()], [RegExp.prototype, /./] ].forEach(function(pair){ pair[0][s] = "foo"; passed &= (Object.prototype.toString.call(pair[1]) === "[object foo]"); delete pair[0][s]; }); return passed;
}
No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
No
Error
Error
Symbol.toStringTag, new built-ins
?
function(){
var passed = true; var s = Symbol.toStringTag; [ [String, "String Iterator"], [Array, "Array Iterator"], [Map, "Map Iterator"], [Set, "Set Iterator"] ].forEach(function(pair){ var iterProto = Object.getPrototypeOf(new pair[0]()[Symbol.iterator]()); passed = passed && iterProto.hasOwnProperty(s) && iterProto[s] === pair[1]; }); passed = passed && Object.getPrototypeOf(function*(){})[s] === "GeneratorFunction" && Object.getPrototypeOf(function*(){}())[s] === "Generator" && Map.prototype[s] === "Map" && Set.prototype[s] === "Set" && ArrayBuffer.prototype[s] === "ArrayBuffer" && DataView.prototype[s] === "DataView" && Promise.prototype[s] === "Promise" && Symbol.prototype[s] === "Symbol" && typeof Object.getOwnPropertyDescriptor( Object.getPrototypeOf(Int8Array).prototype, Symbol.toStringTag).get === "function"; return passed;
}
Yes
Yes
Yes
Yes
No
Error
No
Error
No
Error
No
Error
No
Error
No
Error
No
Error
Error
No
Error
Error
Symbol.toStringTag, misc. built-ins
?
function(){
var s = Symbol.toStringTag; return Math[s] === "Math" && JSON[s] === "JSON";
}
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
No
Error
Error
Symbol.unscopables
?
function(){
var a = { foo: 1, bar: 2 }; a[Symbol.unscopables] = { bar: true }; with (a) { return foo === 1 && typeof bar === "undefined"; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error

built-in extensions

Object static methods

Object.assign
?
function(){
var o = Object.assign({a:true}, {b:true}, {c:true}); return "a" in o && "b" in o && "c" in o;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Object.is
?
function(){
return typeof Object.is === 'function' && Object.is(NaN, NaN) && !Object.is(-0, 0);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Object.getOwnPropertySymbols
?
function(){
var o = {}; var sym = Symbol(), sym2 = Symbol(), sym3 = Symbol(); o[sym] = true; o[sym2] = true; o[sym3] = true; var result = Object.getOwnPropertySymbols(o); return result[0] === sym && result[1] === sym2 && result[2] === sym3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Object.setPrototypeOf
?
function(){
return Object.setPrototypeOf({}, Array.prototype) instanceof Array;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error

function "name" property

function statements
?
function(){
function foo(){}; return foo.name === 'foo' && (function(){}).name === '';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
function expressions
?
function(){
return (function foo(){}).name === 'foo' && (function(){}).name === '';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
new Function
?
function(){
return (new Function).name === "anonymous";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
bound functions
?
function(){
function foo() {}; return foo.bind({}).name === "bound foo" && (function(){}).bind({}).name === "bound ";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
variables (function)
?
function(){
var foo = function() {}; var bar = function baz() {}; return foo.name === "foo" && bar.name === "baz";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
object methods (function)
?
function(){
var o = { foo: function(){}, bar: function baz(){}}; o.qux = function(){}; return o.foo.name === "foo" && o.bar.name === "baz" && o.qux.name === "";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
accessor properties
?
function(){
var o = { get foo(){}, set foo(x){} }; var descriptor = Object.getOwnPropertyDescriptor(o, "foo"); return descriptor.get.name === "get foo" && descriptor.set.name === "set foo";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
shorthand methods
?
function(){
var o = { foo(){} }; return o.foo.name === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
shorthand methods (no lexical binding)
?
function(){
var f = "foo"; return ({f() { return f; }}).f() === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
symbol-keyed methods
?
function(){
var sym1 = Symbol("foo"); var sym2 = Symbol(); var o = { [sym1]: function(){}, [sym2]: function(){} }; return o[sym1].name === "[foo]" && o[sym2].name === "";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Error
Error
class statements
?
function(){
class foo {}; class bar { static name() {} }; return foo.name === "foo" && typeof bar.name === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
class expressions
?
function(){
return class foo {}.name === "foo" && typeof class bar { static name() {} }.name === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
variables (class)
?
function(){
var foo = class {}; var bar = class baz {}; var qux = class { static name() {} }; return foo.name === "foo" && bar.name === "baz" && typeof qux.name === "function";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Error
Error
object methods (class)
?
function(){
var o = { foo: class {}, bar: class baz {}}; o.qux = class {}; return o.foo.name === "foo" && o.bar.name === "baz" && o.qux.name === "";
}
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
Error
Error
Error
class prototype methods
?
function(){
class C { foo(){} }; return (new C).foo.name === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
class static methods
?
function(){
class C { static foo(){} }; return C.foo.name === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
isn't writable, is configurable
?
function(){
var descriptor = Object.getOwnPropertyDescriptor(function f(){},"name"); return descriptor.enumerable === false && descriptor.writable === false && descriptor.configurable === true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No

String static methods

String.raw
?
function(){
return typeof String.raw === 'function';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
String.fromCodePoint
?
function(){
return typeof String.fromCodePoint === 'function';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No

String.prototype methods

String.prototype.codePointAt
?
function(){
return typeof String.prototype.codePointAt === 'function';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
String.prototype.normalize
?
function(){
return typeof String.prototype.normalize === "function" && "c\u0327\u0301".normalize("NFC") === "\u1e09" && "\u1e09".normalize("NFD") === "c\u0327\u0301";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
String.prototype.repeat
?
function(){
return typeof String.prototype.repeat === 'function' && "foo".repeat(3) === "foofoofoo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
String.prototype.startsWith
?
function(){
return typeof String.prototype.startsWith === 'function' && "foobar".startsWith("foo");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
String.prototype.startsWith throws on RegExp
?
function(){
try { "a".startsWith(/./); } catch(e) { return typeof String.prototype.startsWith === 'function'; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes