I'd like to share the same "instance" of IndexedDB across multiple windows of the same app. Given win1 and win2, I'd like to be able to store some data in win1 IndexedDB, and then get the same data in win2.
Currently in dev tools I have checked that two different IndexedDB are being served to each window. As a consequence, data of win1 is not available to win2, and viceversa.
In Electron's documentation for BrowserWindow I've noticed that you can set the value partition, which should make the same session available to all windows.
In this way I should be able to share the same instance of IndexedDB, but I'm unable to get it working.
I've set the following options for both windows:
const options = {
webPreferences: {
partition: 'persist:myapp'
}
};
However, they still get two different IndexedDBs.