MCPcopy Create free account
hub / github.com/Effect-TS/effect / f

Function f

packages/effect/src/ui/html/BrowserRouter.ts:541–550  ·  view source on GitHub ↗
(event: PopStateEvent)

Source from the content-addressed store, hash-verified

539 load: (href) => location.assign(href),
540 listen: (popped) => {
541 const f = (event: PopStateEvent) => {
542 popping = true
543 try {
544 popped(currentUrl(), history.state, event.hasUAVisualTransition)
545 } finally {
546 popping = false
547 }
548 // After `onLeave` saved the entry the Router left.
549 if (scroll) track()
550 }
551 window.addEventListener("popstate", f)
552 return () => window.removeEventListener("popstate", f)
553 }

Callers 15

onceFunction · 0.70
withElementFunction · 0.70
filterFunction · 0.50
fromStepWithMetadataFunction · 0.50
Schedule.tsFile · 0.50
TxHashMap.tsFile · 0.50
makeRunMainFunction · 0.50
UndefinedOr.tsFile · 0.50
liftThrowableFunction · 0.50
Effect.tsFile · 0.50
foldFunction · 0.50
foldArrayFunction · 0.50

Calls 3

poppedFunction · 0.85
currentUrlFunction · 0.85
trackFunction · 0.70

Tested by

no test coverage detected