Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

fixes #115: @@toStringTag is an accessor now #213

Closed
wants to merge 1 commit into from
Closed
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
54 changes: 50 additions & 4 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,31 @@ <h1>Iterator.prototype.find ( _fn_ )</h1>

<emu-clause id="sec-iteratorprototype-@@tostringtag">
<h1>Iterator.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value "Iterator".</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>`Iterator.prototype[@@toStringTag]` is an accessor property with attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }. The [[Get]] and [[Set]] attributes are defined as follows:</p>

<emu-clause id="sec-get-iteratorprototype-@@tostringtag">
<h1>get Iterator.prototype [ @@toStringTag ]</h1>
<p>The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:</p>
<emu-alg>
1. Return *"Iterator"*.
</emu-alg>
</emu-clause>

<emu-clause id="sec-set-iteratorprototype-@@tostringtag">
<h1>set Iterator.prototype [ @@toStringTag ]</h1>
<p>The value of the [[Set]] attribute is a built-in function that takes an argument _v_. It performs the following steps when called:</p>
<emu-alg>
1. Let _O_ be ? RequireObjectCoercible(*this* value).
1. If _O_ is %Iterator.prototype%, then
1. Return *undefined*.
1. Let _desc_ be ? _O_.[[GetOwnProperty]](@@toStringTag).
1. If IsDataDescriptor(_desc_) is *true* and _desc_.[[Writable]] is *false*, then
1. Return *undefined*.
1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _v_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
1. Perform ? _O_.[[DefineOwnProperty]](@@toStringTag, _newDesc_).
1. Return *undefined*.
</emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>

Expand Down Expand Up @@ -952,8 +975,31 @@ <h1>AsyncIterator.prototype.find ( _fn_ )</h1>

<emu-clause id="sec-asynciteratorprototype-@@tostringtag">
<h1>AsyncIterator.prototype [ @@toStringTag ]</h1>
<p>The initial value of the @@toStringTag property is the String value "Async Iterator".</p>
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>`AsyncIterator.prototype[@@toStringTag]` is an accessor property with attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }. The [[Get]] and [[Set]] attributes are defined as follows:</p>

<emu-clause id="sec-get-asynciteratorprototype-@@tostringtag">
<h1>get AsyncIterator.prototype [ @@toStringTag ]</h1>
<p>The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:</p>
<emu-alg>
1. Return *"AsyncIterator"*.
</emu-alg>
</emu-clause>

<emu-clause id="sec-set-asynciteratorprototype-@@tostringtag">
<h1>set AsyncIterator.prototype [ @@toStringTag ]</h1>
<p>The value of the [[Set]] attribute is a built-in function that takes an argument _v_. It performs the following steps when called:</p>
<emu-alg>
1. Let _O_ be ? RequireObjectCoercible(*this* value).
1. If _O_ is %AsyncIterator.prototype%, then
1. Return *undefined*.
1. Let _desc_ be ? _O_.[[GetOwnProperty]](@@toStringTag).
1. If IsDataDescriptor(_desc_) is *true* and _desc_.[[Writable]] is *false*, then
1. Return *undefined*.
1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _v_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
1. Perform ? _O_.[[DefineOwnProperty]](@@toStringTag, _newDesc_).
1. Return *undefined*.
</emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
Expand Down