Skip to content

Conversation

@zaroxh
Copy link

@zaroxh zaroxh commented Oct 20, 2025

On desktop, CEF triggers multiple loadingState changes (for the main frame and again for DevTools or iFrames). Each change currently reinjects the JS bridge, which resets the callbacks map & callbackId. If a callback is pending during reinjection, it’s lost and never resolves.
This change ensures the bridge is injected only once per page context by checking whether it already exists before injecting. This prevents callback resets while preserving expected behavior across main content, DevTools, and iFrames.

@zaroxh zaroxh changed the title Prevent duplicate JS bridge injection on desktop Fix: Prevent duplicate JS bridge injection on desktop Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant