<emu-alg><ol><li>Let <var>locale</var> be <var>loc</var>.<var class="field">[[Locale]]</var>.</li><li>Let <var>script</var> be <emu-xref aoid="GetLocaleScript"><a href="https://tc39.es/ecma402/#sec-getlocalescript">GetLocaleScript</a></emu-xref>(<var>locale</var>).</li><li>If <var>script</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>maximal</var> be the result of the <a href="https://unicode.org/reports/tr35/#Likely_Subtags" data-print-href="">Add Likely Subtags</a> algorithm applied to <var>locale</var>. If an error is signaled, return <emu-val>undefined</emu-val>.</li><li>Set <var>script</var> to <emu-xref aoid="GetLocaleScript"><a href="https://tc39.es/ecma402/#sec-getlocalescript">GetLocaleScript</a></emu-xref>(<var>maximal</var>).</li><li>If <var>script</var> is <emu-val>undefined</emu-val>, return <emu-val>undefined</emu-val>.</li></ol></li><li>If the default general ordering of characters within a line in <var>script</var> is right-to-left, return "rtl".</li><li>If the default general ordering of characters within a line in <var>script</var> is left-to-right, return "ltr".</li><li>If the default general ordering of characters within a line in <var>script</var> is top-to-bottom, return "ttb".</li><li>Return <emu-val>undefined</emu-val>.</li></ol></emu-alg>
0 commit comments