Release: createWorklet and addModule Shared Storage updates

101 views
Skip to first unread message

Tara Agyemang

unread,
Oct 15, 2024, 10:56:11 AMOct 15
to Shared Storage API announcements

Hey all,


We’ve released changes to createWorklet() and addModule() as of M130, starting Tuesday October 15th.


If you’re already using createWorklet() and using the script origin as the worklet's data partition origin, you’ll need to set the “dataOrigin” as below to ensure compatibility:


sharedStorage.createWorklet(scriptUrl, {dataOrigin: "script-origin"});


For developers currently using the addModule() function, we’ve updated this to allow cross-origin scripts to be passed in which should not cause any breakage to current uses of addModule(). As createWorklet() allows the creation of a cross-origin data partition and the creation of multiple worklets, we recommend you use createWorklet() over addModule().


The API walkthrough documentation reflects these new changes. If you have questions or comments, reply to this post or open an issue in the Privacy Sandbox Dev Support repository on GitHub.
Reply all
Reply to author
Forward
0 new messages