Skip to content
Open
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
35 changes: 24 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -125554,6 +125554,12 @@ interface <dfn interface>Navigator</dfn> {

<div w-nodev>

<div algorithm>
<p>Each object that implements <code>NavigatorLanguage</code> has
an associated <dfn attribute for="NavigatorLanguage">plausible languages array</dfn>,
which is a frozen array of BCP 47 language tags. It is initially empty.</p>
</div>

<div algorithm>
<p>The <dfn attribute for="NavigatorLanguage"><code
data-x="dom-navigator-language">language</code></dfn> getter steps are:</p>
Expand All @@ -125562,7 +125568,7 @@ interface <dfn interface>Navigator</dfn> {
<li>Let <var>emulatedLanguage</var> be the <span>WebDriver BiDi emulated language</span> for
<span>this</span>'s <span>relevant settings object</span>.</li>

<li>If <var>emulatedLanguage</var> is not null, return <var>emulatedLanguage</var>.</li>
<li>If <var>emulatedLanguage</var> is not null, then return <var>emulatedLanguage</var>.</li>

<li>Return a valid BCP 47 language tag representing either <span>a plausible language</span> or
the user's most preferred language. <ref>BCP47</ref></li>
Expand All @@ -125574,19 +125580,26 @@ interface <dfn interface>Navigator</dfn> {
data-x="dom-navigator-languages">languages</code></dfn> getter steps are:</p>

<ol>
<li>Let <var>emulatedLanguage</var> be the <span>WebDriver BiDi emulated language</span> for
<span>this</span>'s <span>relevant settings object</span>.</li>
<li>Let <var>languages</var> be an empty array.</li>

<li>If <var>emulatedLanguage</var> is not null, return a <span>frozen array</span> containing
<var>emulatedLanguage</var>.</li>
<li>Let <var>emulatedLanguage</var> be the <span>WebDriver BiDi emulated language</span>
for <span>this</span>'s <span>relevant settings object</span>.</li>

<li>Return a <span>frozen array</span> of valid BCP 47 language tags representing either one or
more <span data-x="a plausible language">plausible languages</span>, or the user's preferred
languages, ordered by preference with the most preferred language first. <ref>BCP47</ref></li>
</ol>
<li>If <var>emulatedLanguage</var> is not null, then set <var>languages</var> to
<span>frozen array</span> containing <var>emulatedLanguage</var>.</li>

<li>Otherwise, set <var>languages</var> to <span>frozen array</span> of
valid BCP 47 language tags representing either one or more
<span data-x="a plausible language">plausible languages</span>, or
the user's preferred languages, ordered by preference with
the most preferred language first. <ref>BCP47</ref></li>

<p>The same object must be returned until the user agent needs to return different values, or
values in a different order, or <var>emulatedLanguage</var> is updated.</p>
<li>If <var>languages</var> and <span>this</span>'s <var>plausible languages array</var>
do not have the same values in the same order, then set
<span>this</span>'s <span>plausible languages array</span> to <var>languages</var>.</li>

<li>Return <span>this</span>'s <span>plausible languages array</span>.</li>
</ol>
</div>

<div algorithm>
Expand Down