Skip to content

Commit 1048a66

Browse files
authored
Specify navigator.appVersion to match reality
Closes #7773.
1 parent 3b5c55f commit 1048a66

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

source

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98800,10 +98800,35 @@ interface <dfn interface>Navigator</dfn> {
9880098800
<dt><dfn attribute for="NavigatorID"><code data-x="dom-navigator-appName">appName</code></dfn></dt>
9880198801
<dd><p>Must return the string "<code data-x="">Netscape</code>".</p></dd>
9880298802

98803-
<dt><dfn attribute for="NavigatorID"><code data-x="dom-navigator-appVersion">appVersion</code></dfn></dt>
98804-
<dd><p>Must return either the string "<code data-x="">4.0</code>" or a string representing the
98805-
version of the browser in detail, e.g. "<code data-x="">1.0 (VMS; en-US)
98806-
Mellblomenator/9000</code>".</p></dd>
98803+
<dt><dfn attribute for="NavigatorID"><code
98804+
data-x="dom-navigator-appVersion">appVersion</code></dfn></dt>
98805+
<dd>
98806+
<p>Must return the appropriate string that starts with "<code data-x="">5.0 (</code>", as
98807+
follows:</p>
98808+
98809+
<p>Let <var>trail</var> be the substring of <span data-x="default-user-agent-value">default
98810+
`<code>User-Agent</code>` value</span> that follows the "<code data-x="">Mozilla/</code>"
98811+
prefix.</p>
98812+
<!-- Fetch doesn't actually require the value to start with "Mozilla/5.0 (". -->
98813+
98814+
<dl class="switch"> <dt>If the <span data-x="concept-navigator-compatibility-mode">navigator
98815+
compatibility mode</span> is <i>Chrome</i> or <i>WebKit</i></dt>
98816+
<dd><p>Return <var>trail</var>.</p></dd>
98817+
98818+
<dt>If the <span data-x="concept-navigator-compatibility-mode">navigator compatibility
98819+
mode</span> is <i>Gecko</i></dt>
98820+
<dd>
98821+
<p>If <var>trail</var> starts with "<code data-x="">5.0 (Windows</code>", then return "<code
98822+
data-x="">5.0 (Windows)</code>".</p>
98823+
98824+
<p>Otherwise, return the prefix of <var>trail</var> up to but not including the first U+003B
98825+
(;), concatenated with the character U+0029 RIGHT PARENTHESIS. For example, "<code
98826+
data-x="">5.0 (Macintosh)</code>", "<code data-x="">5.0 (Android 10)</code>", or "<code
98827+
data-x="">5.0 (X11)</code>".</p> <!-- Unclear if Gecko mode returning a shorter string that
98828+
doesn't contain the whole trail is needed for Web compat. -->
98829+
</dd>
98830+
</dl>
98831+
</dd>
9880798832

9880898833
<!-- buildID: Mozilla only -->
9880998834

0 commit comments

Comments
 (0)