ressurect broadcast-channel
This commit is contained in:
parent
f9bae60357
commit
36f9fb99ae
4 changed files with 88 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ import { api } from './os';
|
|||
import { get, set } from './scripts/idb-proxy';
|
||||
import { defaultStore } from './store';
|
||||
import { stream } from './stream';
|
||||
import { BroadcastChannel } from 'broadcast-channel';
|
||||
|
||||
type StateDef = Record<string, {
|
||||
where: 'account' | 'device' | 'deviceAccount';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
export const reloadChannel = new BroadcastChannel('reload'); // string | null
|
||||
import { BroadcastChannel } from 'broadcast-channel';
|
||||
|
||||
export const reloadChannel = new BroadcastChannel<string | null>('reload');
|
||||
|
||||
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
||||
export function unisonReload(path?: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue