Sharing local storage across domains using iframe + storage partioning

904 views
Skip to first unread message

John Dickerson

unread,
Sep 7, 2022, 5:30:58 AM9/7/22
to Chromium Extensions
Greetings,

Is this supported with manifest 3?:


If it is supported now, will it continue to be supported?.  I read here about storage partitioning:


I have been playing with orbitDB in chrome extensions and want to access info from all domains.  orbitdb is a distributed db.  I thought maybe I could store it in the local storage of an injected iframe (injected via content script).

Can anyone give guidance?

Thank you 

JD

    

wOxxOm

unread,
Sep 7, 2022, 5:56:33 AM9/7/22
to Chromium Extensions, john.charle...@gmail.com
The first approach might work. It is a standard DOM feature, which of course is supported in ManifestV3 extensions. The only difference (that is not important for your use case) is that service worker cannot create an iframe, a workaround for that is the chrome.offscreen API when it's enabled in stable Chrome.

The second thing does not apply to extensions because they don't have domains.

Another possibility is to make the actual requests to the DB in the background script, whereas the content script will only provide an interface.

There may be other solutions depending on what specifically you want to do.
Reply all
Reply to author
Forward
0 new messages