RTCStatsReport: [Symbol.iterator]() 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 [Symbol.iterator]() Methode des RTCStatsReport Interfaces implementiert das iterable Protokoll und ermöglicht es, Statistikberichte mit den meisten Syntaxen zu konsumieren, die Iterables erwarten, wie zum Beispiel die Spread-Syntax und for...of Schleifen. Sie gibt ein Iterator-Objekt zurück, das die Schlüssel-Werte-Paare des Berichts in Einfüge-Reihenfolge liefert.

Der anfängliche Wert dieser Eigenschaft ist das gleiche Funktionsobjekt wie der anfängliche Wert der RTCStatsReport.entries() Methode.

Die Methode ist ansonsten identisch mit Map.prototype[Symbol.iterator]().

Syntax

js
RTCStatsReport[Symbol.iterator]()

Rückgabewert

Der gleiche Rückgabewert wie RTCStatsReport.entries(). Dies ist ein neues iterierbares Iterator-Objekt, das die Schlüssel-Werte (id-"Statistik-Dictionary") Paare des Berichts liefert.

Spezifikationen

No specification found

No specification data found for api.RTCStatsReport.@@iterator.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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
[Symbol.iterator]

Legend

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

Full support
Full support

Siehe auch