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

Function readBridge

packages/plugins/desktop-settings/src/client.tsx:53–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53const 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
66const inDesktop = readBridge() !== null;
67

Callers 2

client.tsxFile · 0.85
SettingsPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected