Skip to content

fix(windows): deliver WebView messages through the native channel - #81

Merged
1lck merged 1 commit into
Lithe-IDEA:mainfrom
WhiteZeek:fix/2529-lithe-webview-messages
Nov 30, 2026
Merged

1lck merged 1 commit into
Lithe-IDEA:mainfrom
WhiteZeek:fix/2529-lithe-webview-messages

Conversation

@WhiteZeek

@WhiteZeek WhiteZeek commented Nov 30, 2026 •

Copy link
Copy Markdown

What this changes

Switch the Windows adapter in Lithe's Viva fork to WebView2's native host-to-page message channel. Send the payload as a JSON string so quotes, line breaks and embedded NULs reach the page intact. The document bridge passes each message to the existing Viva callback.

Why

Lithe's plugin pages and web previews both use this transport. Delivering replies as data keeps message delivery separate from explicit application script execution. Lithe #2529

How it was verified

  • All internal/platform Test* cases passed under JS/Wasm in Node 24 on this branch. An unfiltered run also selected two clipboard fuzz targets whose seed directories the Windows Wasm runner could not open (O_DIRECTORY). The bridge test covers the main-frame guard, repeated installation and string delivery.
  • Windows AMD64 adapter tests compiled, and go vet passed for both affected platform packages. The Windows CI job selects the COM test for queued messages, order, string contents and late replies.
  • Live WebView2 CSP and navigation checks and runtime checks of both Lithe consumers are pending.

Where the boundary sits

Lithe maintains this patch in its Viva fork. Once it lands on the fork's main branch, the desktop app can pin that commit and verify both consumers.

Cost

One event listener per injected WebView2 document. Delivery uses the existing window thread and operation queue.

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.

2 participants