(event: MouseEvent)
| 55 | } |
| 56 | if (isOptedOut) { |
| 57 | const onClick = (event: MouseEvent) => { |
| 58 | const anchor = (event.target as Element | null)?.closest?.('a[href]'); |
| 59 | if (!(anchor instanceof HTMLAnchorElement) || !isOutsideLink(anchor)) { |
| 60 | return; |
| 61 | } |
| 62 | event.preventDefault(); |
| 63 | openInSystemBrowser(anchor.href); |
| 64 | }; |
| 65 | document.addEventListener('click', onClick, true); |
| 66 | return () => document.removeEventListener('click', onClick, true); |
| 67 | } |
nothing calls this directly
no test coverage detected