MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / closePopup

Function closePopup

packages/react/src/api/oauth-popup.ts:143–151  ·  view source on GitHub ↗
(popup: Window | null)

Source from the content-addressed store, hash-verified

141
142 /** Close the popup window if it's still open. Swallows cross-origin errors. */
143 const closePopup = (popup: Window | null) => {
144 if (!popup) return;
145 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: cross-origin popup state can throw and cleanup is best-effort
146 try {
147 if (!popup.closed) popup.close();
148 } catch {
149 // Cross-origin access can throw; safe to ignore.
150 }
151 };
152
153 const settle = () => {
154 if (settled) return;

Callers 1

openOAuthPopupFunction · 0.85

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected