Skip to content

Commit f091eee

Browse files
leaanthonyclaude
andauthored
[v3] Fix Windows build error with go-webview2 v1.0.22 (#4645)
* Fix Windows build error with go-webview2 v1.0.22 Fixes #4513 The go-webview2 library changed the MessageCallback signature in v1.0.22 from `func(string)` to `func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs)`. This caused a build error for users: ``` cannot use w.processMessage (value of type func(message string)) as func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs) value in assignment ``` Changes: - Updated processMessage signature to match go-webview2 v1.0.22 - Upgraded go-webview2 dependency from v1.0.21 to v1.0.22 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix Windows build error with go-webview2 v1.0.22 Fixes #4513 The go-webview2 library changed the MessageCallback signature in v1.0.22 from `func(string)` to `func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs)`. This caused a build error for users: ``` cannot use w.processMessage (value of type func(message string)) as func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs) value in assignment ``` Changes: - Updated processMessage signature to match go-webview2 v1.0.22 - Upgraded go-webview2 dependency from v1.0.21 to v1.0.22 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent 8cd89fc commit f091eee

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

v3/UNRELEASED_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ After processing, the content will be moved to the main changelog and this file
2323

2424
## Fixed
2525
<!-- Bug fixes -->
26+
- Fix Linux appimage appicon variable in Linux taskfile [PR #4644](https://github.com/wailsapp/wails/pull/4644)
27+
- Fix Windows build error caused by go-webview2 v1.0.22 signature change (#4513, #4645)
2628

2729
## Deprecated
2830
<!-- Soon-to-be removed features -->

v3/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ require (
3434
github.com/samber/lo v1.49.1
3535
github.com/stretchr/testify v1.10.0
3636
github.com/tc-hib/winres v0.3.1
37-
github.com/wailsapp/go-webview2 v1.0.21
37+
github.com/wailsapp/go-webview2 v1.0.22
3838
github.com/wailsapp/mimetype v1.4.1
3939
github.com/wailsapp/task/v3 v3.40.1-patched3
4040
golang.org/x/sys v0.31.0

v3/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ github.com/tc-hib/winres v0.3.1 h1:CwRjEGrKdbi5CvZ4ID+iyVhgyfatxFoizjPhzez9Io4=
323323
github.com/tc-hib/winres v0.3.1/go.mod h1:C/JaNhH3KBvhNKVbvdlDWkbMDO9H4fKKDaN7/07SSuk=
324324
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
325325
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
326-
github.com/wailsapp/go-webview2 v1.0.21 h1:k3dtoZU4KCoN/AEIbWiPln3P2661GtA2oEgA2Pb+maA=
327-
github.com/wailsapp/go-webview2 v1.0.21/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
326+
github.com/wailsapp/go-webview2 v1.0.22 h1:YT61F5lj+GGaat5OB96Aa3b4QA+mybD0Ggq6NZijQ58=
327+
github.com/wailsapp/go-webview2 v1.0.22/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
328328
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
329329
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
330330
github.com/wailsapp/task/v3 v3.40.1-patched3 h1:i6O1WNdSur9CGaiMDIYGjsmj/qS4465zqv+WEs6sPRs=

v3/pkg/application/webview_window_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ func (w *windowsWebviewWindow) isAlwaysOnTop() bool {
18011801

18021802
// processMessage is given a message sent from JS via the postMessage API
18031803
// We put it on the global window message buffer to be processed centrally
1804-
func (w *windowsWebviewWindow) processMessage(message string) {
1804+
func (w *windowsWebviewWindow) processMessage(message string, sender *edge.ICoreWebView2, args *edge.ICoreWebView2WebMessageReceivedEventArgs) {
18051805
// We send all messages to the centralised window message buffer
18061806
windowMessageBuffer <- &windowMessage{
18071807
windowId: w.parent.id,

0 commit comments

Comments
 (0)