Node.js ES2015 Support

8.0.0Nightly!99% complete99% complete 7.2.099% complete99% complete 7.1.099% complete99% complete 6.9.199% complete99% complete 6.9.099% complete99% complete 6.8.199% complete99% complete 5.12.059% complete58% complete 5.11.159% complete58% complete 5.11.059% complete58% complete 4.6.257% complete54% complete 4.6.157% complete54% complete 4.3.257% complete54% complete 0.12.1731% complete23% complete 0.10.4811% 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
Yes
Error
Yes
Error
Yes
Error
Yes
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
Yes
Error
Yes
Error
Yes
Error
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
ArrayBuffer[Symbol.species]
?
function(){
return typeof ArrayBuffer[Symbol.species] === 'function';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
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
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
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
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
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
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
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error