Skip to content

Commit cac6b41

Browse files
authored
Avoid suggesting the empty string for navigator.platform
navigator.platform was permitted to return the empty string due to a privacy-motivated spec change in ecefa6e. Since 2008, the understanding of changing things like this for privacy has evolved from returning special privacy values to returning a value that is already commonly returned for non-privacy reasons. Therefore, change the spec not to say "the empty string" but to permit returning a string commonly returned on another platform. Additionally, change the examples to be from the set of values given at https://www.chromium.org/updates/ua-reduction/ to avoid suggesting more-identifying and potentially-less-compatible values. But, for now, avoid actually constraining the permitted values to a reduced set. Further work on constraining these values is tracked mostly in https://github.com/whatwg/compat; see especially whatwg/compat#174.
1 parent cc7626a commit cac6b41

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source

+4-3
Original file line numberDiff line numberDiff line change
@@ -98592,9 +98592,10 @@ interface <dfn interface>Navigator</dfn> {
9859298592
<!-- oscpu: Mozilla only -->
9859398593

9859498594
<dt><dfn attribute for="NavigatorID"><code data-x="dom-navigator-platform">platform</code></dfn></dt>
98595-
<dd><p>Must return either the empty string or a string representing the platform on which the
98596-
browser is executing, e.g. "<code data-x="">MacIntel</code>", "<code data-x="">Win32</code>",
98597-
"<code data-x="">FreeBSD i386</code>", "<code data-x="">WebTV OS</code>".</p></dd>
98595+
<dd><p>Must return a string representing the platform on which the
98596+
browser is executing (e.g. "<code data-x="">MacIntel</code>", "<code data-x="">Win32</code>",
98597+
"<code data-x="">Linux x86_64</code>", "<code data-x="">Linux armv81</code>") or, for privacy and
98598+
compatibility, a string that is commonly returned on another platform.</p></dd>
9859898599

9859998600
<dt><dfn attribute for="NavigatorID"><code data-x="dom-navigator-product">product</code></dfn></dt>
9860098601
<dd><p>Must return the string "<code data-x="">Gecko</code>".</p></dd>

0 commit comments

Comments
 (0)