From 33ef2053acdc6d38484e99b36096c47bb61149cb Mon Sep 17 00:00:00 2001 From: Joakim Ousager Andersen Date: Mon, 30 Sep 2024 17:28:59 +0200 Subject: [PATCH] Fix code bug (#36128) --- .../selectedcandidatepairchange_event/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/rtcicetransport/selectedcandidatepairchange_event/index.md b/files/en-us/web/api/rtcicetransport/selectedcandidatepairchange_event/index.md index 05e486a334517d1..53543631e70646b 100644 --- a/files/en-us/web/api/rtcicetransport/selectedcandidatepairchange_event/index.md +++ b/files/en-us/web/api/rtcicetransport/selectedcandidatepairchange_event/index.md @@ -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"); @@ -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");