Repository navigation
Conversation
WebView2 has no window.webkit.messageHandlers, so the page's host messages were dropped on Windows and the page never reported ready. The bridge now uses window.chrome.webview there, and keeps webkit on Linux. The page script could also run before the document had a body, when the navigation completed, and then failed on documentElement. It now waits for DOMContentLoaded in that case. The window opens on a loading page, which reports ready at once and then moves on to Discord, so the window appears straight away. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PageScript.hposted its host messages throughwindow.webkit.messageHandlers, which WebView2 doesn't have. The messages were dropped, so the page never sentready. The bridge now useswindow.chrome.webviewon Windows and keepswebkiton Linux.document.documentElement. It now waits forDOMContentLoadedin that case.src/LoadingPage.h). It reportsreadyat once, so the window appears straight away, and then moves on to Discord.The branch also carries two earlier commits,
dc101cfand4aa18c3, which are already pushed.Testing
build.sh windows):readymessage from Discord after this change, and the Linux build.🤖 Generated with Claude Code