Open marcus-pousette opened 3 months ago
Possible solution.
Make one tab "parent" and the other ones "children".
When parent tab closed down, make one of the children the parent. All requests from the parent are done directly to the OPFS worker, while the other will broadcast a request to the other parent.
Current solution for persistance in the browser is to use OPFS for block and indexing store. This works well when only one tab is used, but when multiple tabs want to access the same file we will run into problems because accessHandles can only be accessed by one tab at once.