Skip to content

Commit 1196898

Browse files
committed
Normative: Define %TypedArray%.prototype.toLocaleString
Fixes #1094
1 parent 1ab3328 commit 1196898

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

spec/locale-sensitive-functions.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,27 @@ <h1>Array.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] )</h1>
228228
</emu-note>
229229
</emu-clause>
230230
</emu-clause>
231+
232+
<emu-clause id="sup-properties-of-the-%typedarrayprototype%-object">
233+
<h1>Properties of the %TypedArray% Prototype Object</h1>
234+
235+
<emu-clause id="sup-%typedarray%.prototype.tolocalestring">
236+
<h1>%TypedArray%.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] )</h1>
237+
238+
<p>This definition supersedes the definition provided in <emu-xref href="#sec-%typedarray%.prototype.tolocalestring" title></emu-xref>.</p>
239+
240+
<p>When the `toLocaleString` method is called with optional arguments _locales_ and _options_, the following steps are taken:</p>
241+
242+
<emu-alg>
243+
1. Let _obj_ be the *this* value.
244+
1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~).
245+
1. Let _length_ be TypedArrayLength(_taRecord_).
246+
1. Return ? JoinIndexedProperties(_obj_, _length_, ~auto~, *"toLocaleString"*, « _locales_, _options_ »).
247+
</emu-alg>
248+
249+
<emu-note>
250+
This algorithm's steps mirror the steps taken in <emu-xref href="#sec-%typedarray%.prototype.tolocalestring" title></emu-xref>, with the exception that *"toLocaleString"* methods are now invoked with _locales_ and _options_ as arguments.
251+
</emu-note>
252+
</emu-clause>
253+
</emu-clause>
231254
</emu-clause>

0 commit comments

Comments
 (0)