General
What browsers does the Web SDK support?
What browsers does the Web SDK support?
crypto.randomUUID() with a timestamp+random fallback for older environments.Does the Web SDK have any runtime dependencies?
Does the Web SDK have any runtime dependencies?
@gbg/go-bridge-web and @gbg/go-bridge-web-react have zero runtime dependencies. React is a peerDependency for the React package.What's the difference between the two packages?
What's the difference between the two packages?
@gbg/go-bridge-web is the framework-agnostic core (the BridgeHost class, message types, responder, error types, capability constants). @gbg/go-bridge-web-react is a React 19 adapter — a BridgeHostProvider and four hooks — that depends on the core as a peer dependency.How large is the SDK bundle?
How large is the SDK bundle?
Integration
What frameworks does the Web SDK support?
What frameworks does the Web SDK support?
<iframe>. React 19 has first-party support via @gbg/go-bridge-web-react. Vanilla JS, Vue, Angular, Svelte, and older React versions work with the core @gbg/go-bridge-web package.Can I run the SDK on the server (SSR)?
Can I run the SDK on the server (SSR)?
window and the DOM. Mark the component as client-only via "use client" (Next.js App Router), dynamic(..., { ssr: false }) (Pages Router), or your framework’s equivalent gate. The token-exchange step does run on the server.Can I use multiple BridgeHost instances on one page?
Can I use multiple BridgeHost instances on one page?
BridgeHostProvider (or new BridgeHost(...)) owns its own iframe, origin allowlist, capabilities, and handler registry.Why do I have to track the iframe in `useState` instead of `useRef`?
Why do I have to track the iframe in `useState` instead of `useRef`?
BridgeHostProvider rebuilds the underlying BridgeHost when the iframe prop transitions from null to a real element. useRef doesn’t trigger re-renders, so the provider’s effect would never fire.Can I change capabilities after mount?
Can I change capabilities after mount?
key-based) or call registerCustomCapability — that one reads live on every query, no remount needed.Do I need to handle `capability.query` myself?
Do I need to handle `capability.query` myself?
BridgeHost automatically registers CapabilityQueryHandler for the "capability.query" action.What's the difference between a capability ID and an action ID?
What's the difference between a capability ID and an action ID?
camera.document) is a feature negotiation key — appears in the capabilities map. Action ID (e.g. camera.document.capture) is the specific operation — appears in useBridgeCapability(...) and inbound payload.action. Declaring the capability does not implicitly register a handler for the action; both are required.Messaging
Are messages guaranteed to be delivered?
Are messages guaranteed to be delivered?
postMessage is reliable in-process delivery within the browser, as long as iframe.contentWindow is non-null, the listener is attached, and the envelope validates. There is no built-in retry or delivery confirmation.What's the maximum message size?
What's the maximum message size?
postMessage payload limits. For images, capture at moderate resolution and use JPEG at quality ~85. For multi-megabyte transfers, upload from host to your backend and pass a URL through the bridge.Is message order preserved?
Is message order preserved?
postMessage delivers in send order; BridgeHost processes in arrival order.Can I send a message before the iframe loads?
Can I send a message before the iframe loads?
iframe.contentWindow non-null and iframe.src set. Sends before either is ready drop with a console.warn. Wait for a journey.started event or your own readiness signal.What happens to events — does anyone respond?
What happens to events — does anyone respond?
useBridgeHostEvent or the iframe-side SDK.Capabilities
How does the journey discover what the host supports?
How does the journey discover what the host supports?
capability.query request as it loads. The host’s built-in handler responds with { environment: "web", hostVersion, capabilities }, and the journey adapts its flow accordingly.What capabilities does the Web SDK support natively?
What capabilities does the Web SDK support natively?
CAPABILITY_IDS (camera.document, camera.selfie, nfc.read, biometric.auth, etc.). Web hosts realistically support camera.document, camera.selfie, and analytics.forward.How do I report camera permission state to the journey?
How do I report camera permission state to the journey?
CapabilityInfo.permissionState:What if the host can't fulfil a capability the journey requests?
What if the host can't fulfil a capability the journey requests?
responder.unsupported("reason") or responder.error({...}). If a capability is never available on your host, declare it supported: false upfront.Security
Are bridge messages encrypted?
Are bridge messages encrypted?
postMessage channel — they never leave the device. TLS doesn’t apply because there’s no network hop.Can a malicious script on the host page exploit the bridge?
Can a malicious script on the host page exploit the bridge?
allowedOrigins allowlist on both inbound and outbound traffic. A script that repoints iframe.src to a hostile origin can neither send to nor receive from the host — both checks fail.Can the journey exfiltrate host state?
Can the journey exfiltrate host state?
sendEvent or respond. Same-origin policy prevents the journey from reading the host’s DOM, cookies, or storage.Where does the journey URL come from? Can I hardcode it?
Where does the journey URL come from? Can I hardcode it?
@gbg/go-core. Don’t hardcode it, don’t generate it in the browser, and don’t ship @gbg/go-core in your client bundle — its OAuth flow uses a client secret.Debugging
How do I see what messages are being exchanged?
How do I see what messages are being exchanged?
host.receivedMessages directly (capped at 200).Why are messages being silently dropped?
Why are messages being silently dropped?
event.source mismatch, origin not in allowlist, or envelope validation failure. Common causes: trailing slashes in allowedOrigins, scheme/port mismatch, or malformed envelopes. See Troubleshooting.Can I debug from inside the iframe?
Can I debug from inside the iframe?
Next steps
- Getting Started — First integration walkthrough.
- Troubleshooting — Detailed issue resolution.
- API Reference — Complete type reference.