Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ECMAScript 2015 - 2016 diff points

ECMAScript 2015 - 2016 diff points

See also Normative commits:

ES2016 Draft 1

ES2016 Draft 2015-10-19

String.prototype.split has been reverted to ES5 semantics.

The limit parameter is now coerced using ToUint32 instead of ToLength.

  • ES5 ( If limit is undefined, let lim = 2**32-1; else let lim = ToUint32(limit).
  • ES6 ( If limit is undefined, let lim = 2**53-1; else let lim = ToLength(limit).

Notes: 6.12 String.prototype.split, its limit argument, and ToLength vs ToUint32 Commmits: Revert String.prototype.split's to ES5 behavior · tc39/ecma262@bfe9e11

Number, Boolean, and String prototypes are reverted to ES5 semantics


     <!-- es6num="19.3.3" -->
     <emu-clause id="sec-properties-of-the-boolean-prototype-object">
       <h1>Properties of the Boolean Prototype Object</h1>
-      <p>The Boolean prototype object is the intrinsic object %BooleanPrototype%. The Boolean prototype object is an ordinary object. It is not a Boolean instance and does not have a [[BooleanData]] internal slot.</p>
+      <p>The Boolean prototype object is the intrinsic object %BooleanPrototype%. The Boolean prototype object is an ordinary object. The Boolean prototype is itself a Boolean object; it has a [[BooleanData]] internal slot with the value *false*.</p>

ES2016 Draft 2015-11-03

ES2016 Draft 2015-12-01

early error of function tthat contain sloopy and strict.

Add Layer for Promise's unhandled rejection.

window.addEventListener('unhandledrejection', unhandled);
window.addEventListener('rejectionhandled', handled);

Remove [[Construct]] from generators.

Disallow new generatorFunction();

function * g() { }
new g(); // throw error

ES2016 Draft 2015-12-10

Add Array.prototype.includes and TypedArray.prototype.includes.

Why use includess instead of contains?

ES2016 Draft 2015-12-20

[[HostReportErrors]] and GetActiveScriptOrModule()

ES2016 Draft 2016-01-20

ES2016 Draft 2016-02-15

print("indexOf returns +0: " + (1/[true].indexOf(true, -0) > 0));
print("lastIndexOf returns +0: " + (1/[true].lastIndexOf(true, -0) > 0));

see also Improve TypedArray constructor/Proxy interaction by littledan · Pull Request #220 · tc39/ecma262

Remove Proxy enumerate trap and Reflect.enumerate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.