|
87 | 87 | 1. Let _region_ be ? GetOption(_options_, *"region"*, ~string~, ~empty~, GetLocaleRegion(_baseName_)). |
88 | 88 | 1. If _region_ is not *undefined*, then |
89 | 89 | 1. If _region_ cannot be matched by the <code>unicode_region_subtag</code> Unicode locale nonterminal, throw a *RangeError* exception. |
90 | | - 1. Let _variants_ be GetLocaleVariants(_baseName_). |
| 90 | + 1. Let _variants_ be ? GetOption(_options_, *"variants"*, ~string~, ~empty~, GetLocaleVariants(_baseName_)). |
| 91 | + 1. If _variants_ is not *undefined*, then |
| 92 | + 1. If _variants_ cannot be matched by the <code>unicode_variant_subtag</code> Unicode locale nonterminal, throw a *RangeError* exception. |
91 | 93 | 1. Let _allExtensions_ be the suffix of _tag_ following _baseName_. |
92 | 94 | 1. Let _newTag_ be _language_. |
93 | 95 | 1. If _script_ is not *undefined*, set _newTag_ to the string-concatenation of _newTag_, *"-"*, and _script_. |
@@ -310,6 +312,16 @@ <h1>Intl.Locale.prototype.toString ( )</h1> |
310 | 312 | </emu-alg> |
311 | 313 | </emu-clause> |
312 | 314 |
|
| 315 | + <emu-clause id="sec-Intl.Locale.prototype.variants"> |
| 316 | + <h1>get Intl.Locale.prototype.variants</h1> |
| 317 | + <p>`Intl.Locale.prototype.variants` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps:</p> |
| 318 | + <emu-alg> |
| 319 | + 1. Let _loc_ be the *this* value. |
| 320 | + 1. Perform ? RequireInternalSlot(_loc_, [[InitializedLocale]]). |
| 321 | + 1. Return GetLocaleVariants(_loc_.[[Locale]]). |
| 322 | + </emu-alg> |
| 323 | + </emu-clause> |
| 324 | + |
313 | 325 | <emu-clause id="sec-intl.locale.prototype-%symbol.tostringtag%" oldids="sec-Intl.Locale.prototype-@@tostringtag"> |
314 | 326 | <h1>Intl.Locale.prototype [ %Symbol.toStringTag% ]</h1> |
315 | 327 |
|
|
0 commit comments