Skip to content

Commit 36f9c88

Browse files
committed
FF154 Relnote: RTCDtlsTransport error event
1 parent cb5a982 commit 36f9c88

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

  • files/en-us
    • mozilla/firefox/releases/154
    • web/api/rtcdtlstransport/error_event

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ Firefox 154 is the current [Beta version of Firefox](https://www.firefox.com/en-
5050

5151
<!-- #### Removals -->
5252

53-
<!-- ### APIs -->
53+
### APIs
5454

5555
<!-- #### DOM -->
5656

57-
<!-- #### Media, WebRTC, and Web Audio -->
57+
#### Media, WebRTC, and Web Audio
58+
59+
- The [`error`](/en-US/docs/Web/API/RTCDtlsTransport/error_event) event is now fired on {{domxref("RTCDtlsTransport")}} to report DTLS and fingerprinting errors.
60+
([Firefox bug 1805447](https://bugzil.la/1805447)).
5861

5962
<!-- #### Removals -->
6063

files/en-us/web/api/rtcdtlstransport/error_event/index.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,22 @@ Transport-level errors will have one of the following values for the specified e
4646

4747
## Examples
4848

49-
In this example, the `onerror` event handler property is used to set the handler for the `error` event.
49+
Given an {{domxref("RTCPeerConnection")}}, `pc`, the following code handles a DTLS transport error:
5050

5151
```js
52-
transport.onerror = (ev) => {
52+
const dtlsTransport = pc.getSenders()[0].transport;
53+
54+
dtlsTransport.addEventListener("error", (ev) => {
5355
const err = ev.error;
56+
//
57+
});
58+
```
5459

60+
The same code, using the `onerror` event handler property, looks like this:
61+
62+
```js
63+
dtlsTransport.onerror = (ev) => {
64+
const err = ev.error;
5565
//
5666
};
5767
```

0 commit comments

Comments
 (0)