Skip to content

Commit a8a2c3f

Browse files
committed
Expand note on pointerId to discourage authors from relying on persistent id value
1 parent bd06434 commit a8a2c3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,11 @@ <h2><code>PointerEvent</code> interface</h2>
241241
<dl data-dfn-for="PointerEvent" data-link-for="PointerEvent">
242242
<dt><dfn>pointerId</dfn></dt>
243243
<dd>
244-
<p>A unique identifier for the pointer causing the event. User agents MAY reserve a generic <code>pointerId</code> value of <code>0</code> or <code>1</code> for the primary mouse pointer. The <code>pointerId</code> value of <code>-1</code> MUST be reserved and used to indicate events that were generated by something other than a pointing device. For any other pointers, user agents are free to implement different strategies and approaches in how they assign a <code>pointerId</code> value. However, all <a data-lt="active pointer">active pointers</a> in the [=top-level browsing context=] (as defined by [[HTML]]) must be unique, and the identifier MUST NOT be influenced by any other top-level browsing context (i.e. one top-level browsing context cannot assume that the <code>pointerId</code> of a pointer will be the same when the pointer moves outside of the browsing context and into another top-level browsing context). The user agent MAY recycle previously retired values for <code>pointerId</code> from previous active pointers, or it MAY always reuse the same <code>pointerId</code> for a particular pointing device (for instance, to uniquely identify particular pen/stylus inputs from a specific user in a multi-user collaborative application). However, in the latter case, to minimize the chance of fingerprinting and tracking across different pages or domains, the <code>pointerId</code> MUST only be associated explicitly with that particular pointing device for the lifetime of the page / session, and a new randomized <code>pointerId</code> MUST be chosen the next time that particular pointing device is used again in a new session.</p>
244+
<p>A unique identifier for the pointer causing the event. User agents MAY reserve a generic <code>pointerId</code> value of <code>0</code> or <code>1</code> for the primary mouse pointer. The <code>pointerId</code> value of <code>-1</code> MUST be reserved and used to indicate events that were generated by something other than a pointing device. For any other pointers, user agents are free to implement different strategies and approaches in how they assign a <code>pointerId</code> value. However, all <a data-lt="active pointer">active pointers</a> in the [=top-level browsing context=] (as defined by [[HTML]]) must be unique, and the identifier MUST NOT be influenced by any other top-level browsing context (i.e. one top-level browsing context cannot assume that the <code>pointerId</code> of a pointer will be the same when the pointer moves outside of the browsing context and into another top-level browsing context).</p>
245+
<p>The user agent MAY recycle previously retired values for <code>pointerId</code> from previous active pointers, or it MAY always reuse the same <code>pointerId</code> for a particular pointing device (for instance, to uniquely identify particular pen/stylus inputs from a specific user in a multi-user collaborative application). However, in the latter case, to minimize the chance of fingerprinting and tracking across different pages or domains, the <code>pointerId</code> MUST only be associated explicitly with that particular pointing device for the lifetime of the page / session, and a new randomized <code>pointerId</code> MUST be chosen the next time that particular pointing device is used again in a new session.</p>
245246

246247
<div class="note">
247-
<p>The <code>pointerId</code> selection algorithm is implementation specific. Authors cannot assume values convey any particular meaning other than an identifier for the pointer that is unique from all other active pointers. As an example, user agents may simply assign a number, starting from <code>0</code>, to any active pointers, in the order that they become active — but these values are not guaranteed to be monotonically increasing.</p>
248+
<p>The <code>pointerId</code> selection algorithm is implementation specific. Authors cannot assume values convey any particular meaning other than an identifier for the pointer that is unique from all other active pointers. As an example, user agents may simply assign a number, starting from <code>0</code>, to any active pointers, in the order that they become active — but these values are not guaranteed to be monotonically increasing. As the reuse of the same <code>pointerId</code> for a particular pointing device is left up to individual implementations, authors are strongly discouraged from relying on it.</p>
248249
</div>
249250
</dd>
250251
<dt><dfn>width</dfn></dt>

0 commit comments

Comments
 (0)