()
| 51 | } |
| 52 | |
| 53 | const readBridge = (): ExecutorBridge | null => { |
| 54 | if (typeof window === "undefined") return null; |
| 55 | const candidate = (window as Window & { readonly executor?: ExecutorBridge }).executor; |
| 56 | if ( |
| 57 | !candidate || |
| 58 | typeof candidate.getSettings !== "function" || |
| 59 | typeof candidate.getServerConnection !== "function" |
| 60 | ) { |
| 61 | return null; |
| 62 | } |
| 63 | return candidate; |
| 64 | }; |
| 65 | |
| 66 | const inDesktop = readBridge() !== null; |
| 67 |
no outgoing calls
no test coverage detected