Conversation
ljharb
left a comment
There was a problem hiding this comment.
I see syntax for obj[x : y], but not for obj?.[x : y], which I'd expect for consistency with optional bracket access.
| <h1>Properties of the Array Prototype</h1> | ||
| <emu-clause id="sec-array.prototype-@@slice"> | ||
| <h1>Array.prototype [ @@slice ] (start, end)</h1> | ||
| <p> The initial value of the @@slice property is the same function object as the initial value of the `Array.prototype.slice` property. </p> |
There was a problem hiding this comment.
| <p> The initial value of the @@slice property is the same function object as the initial value of the `Array.prototype.slice` property. </p> | |
| <p> The initial value of the @@slice property is %Array.prototype.slice%.</p> |
There was a problem hiding this comment.
This (and the ones below) are directly copied from the spec text: https://tc39.es/ecma262/#sec-array.prototype-@@iterator
Do you prefer to have different (but more concise) text than the spec? I'm ok with either.
There was a problem hiding this comment.
Good call; I’ll make a PR to update the spec itself.
There was a problem hiding this comment.
In that case, I'll leave this as is (consistent with spec ) for now and update it once the spec is changed.
There was a problem hiding this comment.
@gsathya this has now been updated in the main spec.
| <h1>Properties of the %TypedArray.prototype% Object</h1> | ||
| <emu-clause id="sec-properties-of-the-%typedarrayprototype%-@@slice"> | ||
| <h1>%TypedArray%.prototype [ @@slice ] (start, end)</h1> | ||
| <p> The initial value of the @@slice property is the same function object as the initial value of the `%TypedArray%.prototype.slice` property. </p> |
There was a problem hiding this comment.
| <p> The initial value of the @@slice property is the same function object as the initial value of the `%TypedArray%.prototype.slice` property. </p> | |
| <p> The initial value of the @@slice property is `%TypedArray.prototype.slice%`. </p> |
| <h1>Properties of the ArrayBuffer Prototype Object</h1> | ||
| <emu-clause id="sec-properties-of-the-arraybuffer-prototype-@@slice"> | ||
| <h1>ArrayBuffer.prototype [ @@slice ] (start, end)</h1> | ||
| <p> The initial value of the @@slice property is the same function object as the initial value of the `ArrayBuffer.prototype.slice` property. </p> |
There was a problem hiding this comment.
| <p> The initial value of the @@slice property is the same function object as the initial value of the `ArrayBuffer.prototype.slice` property. </p> | |
| <p> The initial value of the @@slice property is `%ArrayBuffer.prototype.slice%`.</p> |
| <h1>Properties of the SharedArrayBuffer Prototype Object</h1> | ||
| <emu-clause id="sec-properties-of-the-sharedarraybuffer-prototype-@@slice"> | ||
| <h1>SharedArrayBuffer.prototype [ @@slice ] (start, end)</h1> | ||
| <p> The initial value of the @@slice property is the same function object as the initial value of the `SharedArrayBuffer.prototype.slice` property. </p> |
There was a problem hiding this comment.
| <p> The initial value of the @@slice property is the same function object as the initial value of the `SharedArrayBuffer.prototype.slice` property. </p> | |
| <p> The initial value of the @@slice property is `%SharedArrayBuffer.prototype.slice%`.</p> |
Co-authored-by: Leo Balter <leonardo.balter@gmail.com>
|
@leobalter, @ljharb, @rbuckton, Thank you for the reviews! I've addressed almost all the comments, please let me know if I missed something. |
|
README still miss the introduction of |
Thanks for the heads up! Filed #38 to track this. |
Loosely based on feedback in #1 and #19
@@sliceproperty onArray.prototype,%TypedArray%.prototype,ArrayBuffer.prototype,SharedArrayBuffer.prototype@@iteratorand.values())Strings because the currentString.prototype.slicebehavior might not be what you want (see https://mathiasbynens.be/notes/javascript-unicode#other-issues by @mathiasbynens)Fixes #1, fixes #16, fixes #9, fixes #33, fixes #19