WorkletSharedStorage: keys() Methode
Experimentell: Dies ist eine experimentelle Technologie
Überprüfen Sie die Browser-Kompatibilitätstabelle sorgfältig vor der Verwendung auf produktiven Webseiten.
Die keys()
Methode der WorkletSharedStorage
-Schnittstelle gibt einen asynchronen Iterator zurück, der die Schlüssel für jedes Element in einer WorkletSharedStorage
-Instanz enthält.
Syntax
keys()
Parameter
Keine.
Rückgabewert
Ein Array der aufzählbaren Eigenschaftsschlüssel des WorkletSharedStorage
.
Ausnahmen
TypeError
-
Ausgelöst, wenn die aufrufende Stelle die Shared Storage API nicht in einem erfolgreichen Datenschutz-Sandbox-Registrierungsprozess eingebunden hat.
Beispiele
// keys() available inside a shared storage worklet module
const storage = await this.sharedStorage;
async function logKeys() {
for await (const key of storage.keys()) {
console.log(key);
}
}
Spezifikationen
No specification found
No specification data found for api.WorkletSharedStorage.keys
.
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
No compatibility data found for api.WorkletSharedStorage.keys
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.