WorkletSharedStorage: context property

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

The context read-only property of the WorkletSharedStorage interface contains contextual data passed into the shared storage worklet from the associated browsing context via the FencedFrameConfig.setSharedStorageContext() method.

Value

A string representing the data. The value will match the latest value that was passed into the FencedFrameConfig.setSharedStorageContext() method prior to navigation to the FencedFrameConfig. If no value was set by setSharedStorageContext() prior to navigation, then context will return undefined.

Examples

See the main WorkletSharedStorage page for an example.

Specifications

The context property is not currently defined in a specification.

Browser compatibility

See also