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

Commit f4ce51c

Browse files
legendecasljharb
andauthored
Add the new method names to Array.prototype [ @@unscopables ] (#35)
* Add the new method names to Array.prototype [ @@unscopables ] * Update spec.emu Co-authored-by: Jordan Harband <ljharb@gmail.com> Co-authored-by: Jordan Harband <ljharb@gmail.com>
1 parent 1e3ae1a commit f4ce51c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

spec.emu

+26
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,30 @@ location: https://tc39.es/proposal-array-grouping/
115115
</emu-alg>
116116
</emu-clause>
117117
</ins>
118+
119+
<emu-clause id="sec-array.prototype-@@unscopables">
120+
<h1>Array.prototype [ @@unscopables ]</h1>
121+
<p>The initial value of the @@unscopables data property is an object created by the following steps:</p>
122+
<emu-alg>
123+
1. Let _unscopableList_ be ! OrdinaryObjectCreate(*null*).
124+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"at"*, *true*).
125+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"copyWithin"*, *true*).
126+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"entries"*, *true*).
127+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"fill"*, *true*).
128+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"find"*, *true*).
129+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"findIndex"*, *true*).
130+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"flat"*, *true*).
131+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"flatMap"*, *true*).
132+
1. <ins>Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"groupBy"*, *true*).</ins>
133+
1. <ins>Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"groupByToMap"*, *true*).</ins>
134+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"includes"*, *true*).
135+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"keys"*, *true*).
136+
1. Perform ! CreateDataPropertyOrThrow(_unscopableList_, *"values"*, *true*).
137+
1. Return _unscopableList_.
138+
</emu-alg>
139+
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
140+
<emu-note>
141+
<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>
142+
</emu-note>
143+
</emu-clause>
118144
</emu-clause>

0 commit comments

Comments
 (0)