Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. SharedStorageWorkletGlobalScope
  4. sharedStorage

SharedStorageWorkletGlobalScope: sharedStorage property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

Thecontext read-only property of theSharedStorageWorkletGlobalScope interface contains aWorkletSharedStorage object instance, which represents the shared storage for a particular origin as exposed to a worklet context.

Value

AWorkletSharedStorage object instance.

Examples

js
// ab-testing-worklet.jsclass SelectURLOperation {  async run(urls, data) {    // Read the user's experiment group from shared storage    const experimentGroup = await this.sharedStorage.get("ab-testing-group");    // Return the group number    return experimentGroup;  }}register("ab-testing", SelectURLOperation);

Specifications

Specification
Shared Storage API
# dom-sharedstorageworkletglobalscope-sharedstorage

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp