WICG / shared-storage

Explainer for proposed web platform Shared Storage API
Other
85 stars 18 forks source link

Spec: make sharedStorage functions not available in the top-level worklet script environment #89

Closed alexmturner closed 11 months ago

alexmturner commented 1 year ago

This is currently implemented but not in the spec, but top-level accesses to sharedStorage should fail in worklet global scopes, e.g.:

class Operation {
  async run(data) {
    // ok to access sharedStorage here
  }
}
register("operation", Operation)

sharedStorage.get(...)  // This should fail