Firefox Tomorrow

web api instance method

WorkletSharedStorage: keys() method

View on MDN ↗

The keys() method of the WorkletSharedStorage interface returns an async iterator, which contains the keys for each item in a WorkletSharedStorage instance.

Syntax

keys()

Parameters

None.

Return value

An array of the WorkletSharedStorage’s enumerable property keys.

Exceptions

Examples

// 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);
  }
}

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also