Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Add the new method names to Array.prototype [ @@unscopables ] #35

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,30 @@ location: https://tc39.es/proposal-array-grouping/
</emu-alg>
</emu-clause>
</ins>

<emu-clause id="sec-array.prototype-@@unscopables">
<h1>Array.prototype [ @@unscopables ]</h1>
<p>The initial value of the @@unscopables data property is an object created by the following steps:</p>
<emu-alg>
1. Let _unscopableList_ be ! OrdinaryObjectCreate(*null*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"at"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"copyWithin"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"entries"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"fill"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"find"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"findIndex"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"flat"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"flatMap"*, *true*).
1. <ins>Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"groupBy"*, *true*).</ins>
1. <ins>Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"groupByToMap"*, *true*).</ins>
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"includes"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"keys"*, *true*).
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"values"*, *true*).
1. Return _unscopableList_.
</emu-alg>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<emu-note>
<p>The own property names of this object are property names that were not included as standard properties of `Array.prototype` prior to the ECMAScript 2015 specification. These names are ignored for `with` statement binding purposes in order to preserve the behaviour of existing code that might use one of these names as a binding in an outer scope that is shadowed by a `with` statement whose binding object is an Array.</p>
</emu-note>
</emu-clause>
</emu-clause>