[Explainer] Support custom dataOrigin
in createWorklet
#198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have developers currently testing the Shared Storage API who have indicated they want to be able to run their worklet on a different origin from the origin that wrote the data. In particular, one of these two actions may be served by, e.g., a CDN, and the other by another domain.
Third-party cookies allow sharing data at the site level. The current architecture of shared storage, however, only allows the invoking context's origin for
addModule()
/createWorklet()
to be used as the shared storage data partition origin, or in the case ofcreateWorklet()
, the worklet script's origin may be manually selected as the data partition origin using the optiondataOrigin: "script-origin"
.We suggest making it possible for a worklet script to use shared storage data from an arbitrary origin other than the worklet script's origin or the invoking context's origin. The data origin would have to opt-in for data use to occur, as data processing could modify the data origin's data, send reports, and would affect its shared storage privacy budget.
While the worklet script will be able to process the data origin's data within a shared storage worklet, the current restrictions will remain in place on output of shared storage data.