Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
The getSenders-function is never called, but just accessed as if it was a getter-property.
  • Loading branch information
Joamus authored Sep 30, 2024
1 parent 0d48cf6 commit 61d59cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A generic {{domxref("Event")}}.
This example creates an event handler for `selectedcandidatepairchange` that updates a display providing the user information about the progress of the ICE negotiation for an {{domxref("RTCPeerConnection")}} called `pc`.

```js
let iceTransport = pc.getSenders[0].transport.iceTransport;
let iceTransport = pc.getSenders()[0].transport.iceTransport;
let localProtoElem = document.getElementById("local-protocol");
let remoteProtoElem = document.getElementById("remote-protocol");

Expand All @@ -53,7 +53,7 @@ iceTransport.addEventListener(
This can also be done by setting the `onselectedcandidatepairchange` event handler property directly.

```js
let iceTransport = pc.getSenders[0].transport.iceTransport;
let iceTransport = pc.getSenders()[0].transport.iceTransport;
let localProtoElem = document.getElementById("local-protocol");
let remoteProtoElem = document.getElementById("remote-protocol");

Expand Down

0 comments on commit 61d59cf

Please sign in to comment.