(e: BeforeUnloadEvent)
| 30 | } |
| 31 | |
| 32 | const closeHandler = (e: BeforeUnloadEvent) => { |
| 33 | const shouldAskConfirmation = checkShouldAskConfirmation(); |
| 34 | |
| 35 | if (shouldAskConfirmation) { |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | e.preventDefault(); |
| 40 | e.returnValue = message; |
| 41 | }; |
| 42 | |
| 43 | const routeHandler = (url: string, { shallow }: { shallow?: boolean }) => { |
| 44 | // Shallow changes on the same page (e.g. ?tab=) leave nothing behind. |
nothing calls this directly
no outgoing calls
no test coverage detected