@@ -107,6 +107,30 @@ <h1>Well-Known Intrinsic Objects</h1>
107
107
<emu-clause id =" sec-abstract-operations" >
108
108
<h1 >Abstract Operations</h1 >
109
109
110
+ <emu-clause id =" sec-SetterThatIgnoresPrototypeProperties" type =" abstract operation" >
111
+ <h1 >
112
+ SetterThatIgnoresPrototypeProperties (
113
+ _home_ : an Object,
114
+ _p_ : a property key,
115
+ _v_ : an ECMAScript language value,
116
+ ): either a normal completion containing ~unused~ or a throw completion
117
+ </h1 >
118
+ <dl class =" header" >
119
+ </dl >
120
+ <emu-alg >
121
+ 1. Let _O_ be ? RequireObjectCoercible(*this* value).
122
+ 1. If _O_ is _home_ , then
123
+ 1. NOTE: Throwing here emulates assignment to a non-writable data property on the _home_ object in strict mode code.
124
+ 1. Throw a *TypeError* exception.
125
+ 1. Let _desc_ be ? _O_ .[[GetOwnProperty]](_p_ ).
126
+ 1. If _desc_ is *undefined* , then
127
+ 1. Perform ? CreateDataPropertyOrThrow(_O_ , _p_ , _v_ ).
128
+ 1. Else,
129
+ 1. Perform ? Set(_O_ , _p_ , _v_ , *true* ).
130
+ 1. Return ~unused~ .
131
+ </emu-alg >
132
+ </emu-clause >
133
+
110
134
<emu-clause id =" sec-operations-on-iterator-objects" >
111
135
<h1 >Operations on Iterator Objects</h1 >
112
136
@@ -289,7 +313,28 @@ <h1>Iterator.prototype</h1>
289
313
290
314
<emu-clause id =" sec-iteratorprototype.constructor" >
291
315
<h1 >Iterator.prototype.constructor</h1 >
292
- <p >The initial value of %Iterator.prototype%.constructor is %Iterator%.</p >
316
+ <p >`Iterator.prototype.constructor` is an accessor property with attributes { [[Enumerable]]: *false* , [[Configurable]]: *true* }. The [[Get]] and [[Set]] attributes are defined as follows:</p >
317
+
318
+ <emu-clause id =" sec-get-iteratorprototype-constructor" >
319
+ <h1 >get Iterator.prototype.constructor</h1 >
320
+ <p >The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:</p >
321
+ <emu-alg >
322
+ 1. Return %Iterator%.
323
+ </emu-alg >
324
+ </emu-clause >
325
+
326
+ <emu-clause id =" sec-set-iteratorprototype-constructor" >
327
+ <h1 >set Iterator.prototype.constructor</h1 >
328
+ <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 >
329
+ <emu-alg >
330
+ 1. Perform ? SetterThatIgnoresPrototypeProperties(%Iterator.prototype%, *"constructor"* , _v_ ).
331
+ 1. Return *undefined* .
332
+ </emu-alg >
333
+ </emu-clause >
334
+
335
+ <emu-note >
336
+ <p >Unlike the *"constructor"* property on most built-in prototypes, for web-compatibility reasons this property must be an accessor.</p >
337
+ </emu-note >
293
338
</emu-clause >
294
339
295
340
<emu-clause id =" sec-iteratorprototype.map" >
@@ -563,9 +608,27 @@ <h1>Iterator.prototype.find ( _predicate_ )</h1>
563
608
564
609
<emu-clause id =" sec-iteratorprototype-@@tostringtag" >
565
610
<h1 >Iterator.prototype [ @@toStringTag ]</h1 >
566
- <p >The initial value of the @@toStringTag property is the String value "Iterator".</p >
611
+ <p >`Iterator.prototype[@@toStringTag]` is an accessor property with attributes { [[Enumerable]]: *false* , [[Configurable]]: *true* }. The [[Get]] and [[Set]] attributes are defined as follows:</p >
612
+
613
+ <emu-clause id =" sec-get-iteratorprototype-@@tostringtag" >
614
+ <h1 >get Iterator.prototype [ @@toStringTag ]</h1 >
615
+ <p >The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:</p >
616
+ <emu-alg >
617
+ 1. Return *"Iterator"* .
618
+ </emu-alg >
619
+ </emu-clause >
620
+
621
+ <emu-clause id =" sec-set-iteratorprototype-@@tostringtag" >
622
+ <h1 >set Iterator.prototype [ @@toStringTag ]</h1 >
623
+ <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 >
624
+ <emu-alg >
625
+ 1. Perform ? SetterThatIgnoresPrototypeProperties(%Iterator.prototype%, %Symbol.toStringTag%, _v_ ).
626
+ 1. Return *undefined* .
627
+ </emu-alg >
628
+ </emu-clause >
629
+
567
630
<emu-note >
568
- <p >Unlike the @@toStringTag on most built-in classes , for web-compatibility reasons this property must be writable .</p >
631
+ <p >Unlike the @@toStringTag property on most built-in prototypes , for web-compatibility reasons this property must be an accessor .</p >
569
632
</emu-note >
570
633
</emu-clause >
571
634
</emu-clause >
0 commit comments