MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / handler

Function handler

packages/auth-client/src/client/utils.ts:99–105  ·  view source on GitHub ↗
(event: StorageEvent)

Source from the content-addressed store, hash-verified

97 /** Get notified by other tabs/windows. */
98 receive(onReceive: (message: BroadcastMessage) => void) {
99 const handler = (event: StorageEvent) => {
100 if (event.key !== name) return;
101 const message: BroadcastMessage = JSON.parse(event.newValue || '{}');
102 if (message?.event !== 'session' || !message?.data) return;
103
104 onReceive(message);
105 };
106 window.addEventListener('storage', handler);
107 return () => window.removeEventListener('storage', handler);
108 },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected