Skip to content

Commit 6bcde9f

Browse files
hamishwilleebsmth
andauthored
FF141 PointerEvent.persistentDeviceId - Relnote/layout (#40035)
* FF141 PointerEvent.persistentDeviceId - Relnote/layout * Update files/en-us/web/api/pointerevent/persistentdeviceid/index.md * fix: Add newline between list item and HTML comment --------- Co-authored-by: Brian Smith <brian@smith.berlin>
1 parent 25d1da7 commit 6bcde9f

File tree

2 files changed

+15
-8
lines changed
  • files/en-us
    • mozilla/firefox/releases/141
    • web/api/pointerevent/persistentdeviceid

2 files changed

+15
-8
lines changed

files/en-us/mozilla/firefox/releases/141/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ Firefox 141 is the current [Beta version of Firefox](https://www.mozilla.org/en-
2121
### HTML
2222

2323
- The HTML [`webkitdirectory`](/en-US/docs/Web/HTML/Reference/Elements/input/file#webkitdirectory) attribute and the corresponding {{domxref("HTMLInputElement.webkitdirectory")}} property are now partially supported on Firefox Android ([Firefox bug 1887878](https://bugzil.la/1887878)).
24-
The attribute can be set to indicate that an [`<input type="file">`](/en-US/docs/Web/HTML/Reference/Elements/input/file) element should offer selection of directories instead of files.
25-
Note that the returned file entries for the selected folder always contain an empty string in ({{domxref("File.webkitRelativePath")}}), which means that using `webkitdirectory` is not suitable for use cases where information about the directory structure is needed ([Firefox bug 1973726](https://bugzil.la/1973726)).
24+
The attribute can be set to indicate that an [`<input type="file">`](/en-US/docs/Web/HTML/Reference/Elements/input/file) element should offer selection of directories instead of files.
25+
Note that the returned file entries for the selected folder always contain an empty string in ({{domxref("File.webkitRelativePath")}}), which means that using `webkitdirectory` is not suitable for use cases where information about the directory structure is needed ([Firefox bug 1973726](https://bugzil.la/1973726)).
26+
2627
<!-- #### Removals -->
2728

2829
<!-- ### CSS -->
@@ -52,7 +53,9 @@ Note that the returned file entries for the selected folder always contain an em
5253

5354
<!-- #### Removals -->
5455

55-
<!-- ### APIs -->
56+
### APIs
57+
58+
- The {{domxref("PointerEvent/persistentDeviceId","persistentDeviceId")}} property of the {{domxref("PointerEvent")}} interface is now supported. This gives each pointing device that interacts with the screen a unique ID that persists for the session. It provides a reliable way to identify multiple pointing devices (such as pens) interacting with the screen simultaneously. ([Firefox bug 1968400](https://bugzil.la/1968400)).
5659

5760
<!-- #### DOM -->
5861

files/en-us/web/api/pointerevent/persistentdeviceid/index.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ browser-compat: api.PointerEvent.persistentDeviceId
88

99
{{ APIRef("Pointer Events") }}
1010

11-
The **`persistentDeviceId`** read-only property of the
12-
{{domxref("PointerEvent")}} interface is a unique identifier for the pointing device generating the `PointerEvent`. This provides a secure, reliable way to identify multiple pointing devices (such as pens) interacting with the screen simultaneously.
11+
The **`persistentDeviceId`** read-only property of the {{domxref("PointerEvent")}} interface is a unique identifier for the pointing device generating the `PointerEvent`.
12+
This provides a secure, reliable way to identify multiple pointing devices (such as pens) interacting with the screen simultaneously.
1313

14-
A `persistentDeviceId` persists for the lifetime of a browsing session. To avoid the risk of fingerprinting/tracking, pointing devices are assigned a new `persistentDeviceId` at the start of each session.
14+
A `persistentDeviceId` persists for the lifetime of a browsing session.
15+
To avoid the risk of fingerprinting/tracking, pointing devices are assigned a new `persistentDeviceId` at the start of each session.
1516

1617
Pointer events whose generating device could not be identified are assigned a `persistentDeviceId` value of `0`.
1718

@@ -20,17 +21,20 @@ Pointer events whose generating device could not be identified are assigned a `p
2021
An integer, or `0` if the device generating the `PointerEvent` could not be identified.
2122

2223
> [!NOTE]
23-
> Due to digitizer and pointing device hardware constraints, a `persistentDeviceId` may not be available for all pointer events, particularly with older hardware. For example, the pointing device might not report its hardware ID to the digitizer in time for `pointerdown` to receive a `persistentDeviceId`: it may initially be `0` and change to a valid value for later events in the stroke.
24+
> Due to digitizer and pointing device hardware constraints, a `persistentDeviceId` may not be available for all pointer events, particularly with older hardware.
25+
> For example, the pointing device might not report its hardware ID to the digitizer in time for `pointerdown` to receive a `persistentDeviceId`: it may initially be `0` and change to a valid value for later events in the stroke.
2426
2527
## Examples
2628

29+
### Assign color for each persistentDeviceId
30+
2731
Assuming the following HTML:
2832

2933
```html
3034
<canvas id="inking-surface" width="1280" height="720"></canvas>
3135
```
3236

33-
The following JavaScript assigns a different inking color to unique pointers interacting with a canvas:
37+
The following JavaScript assigns a different inking color to up to three unique pointers interacting with a canvas:
3438

3539
```js
3640
const colorBlue = 0;

0 commit comments

Comments
 (0)