MCPcopy Create free account
hub / github.com/TanStack/db / handleStorageEvent

Function handleStorageEvent

packages/db/src/local-storage.ts:811–818  ·  view source on GitHub ↗
(event: StorageEvent)

Source from the content-addressed store, hash-verified

809
810 // Listen for storage events from other tabs
811 const handleStorageEvent = (event: StorageEvent) => {
812 // Only respond to changes to our specific key and from our storage
813 if (event.key !== storageKey || event.storageArea !== storage) {
814 return
815 }
816
817 processStorageChanges()
818 }
819
820 // Add storage event listener for cross-tab sync
821 storageEventApi.addEventListener(`storage`, handleStorageEvent)

Callers

nothing calls this directly

Calls 1

processStorageChangesFunction · 0.85

Tested by

no test coverage detected