RTCStatsReport: has() Methode

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Die has()-Methode der RTCStatsReport-Schnittstelle gibt einen booleschen Wert zurück, der angibt, ob ein Bericht ein Statistik-Wörterbuch mit der angegebenen ID enthält.

Die Methode funktioniert ansonsten genauso wie Map.prototype.has().

Syntax

js
has(id)

Parameter

id

Ein String, der die ID eines Statistikobjekts enthält, das in diesem RTCStatsReport vorhanden sein könnte.

Rückgabewert

true, wenn ein Element mit der angegebenen id im RTCStatsReport-Objekt existiert; andernfalls false.

Spezifikationen

Specification
WebRTC: Real-Time Communication in Browsers
# dom-rtcstatsreport

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
has

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch