|
func (e *Chromium) Eval(script string) { |
|
|
|
if e.webview == nil { |
|
return |
|
} |
|
|
|
_script, err := windows.UTF16PtrFromString(script) |
|
if err != nil && !errors.Is(err, windows.ERROR_SUCCESS) { |
|
e.errorCallback(err) |
|
} |
|
|
|
_, _, err = e.webview.vtbl.ExecuteScript.Call( |
|
uintptr(unsafe.Pointer(e.webview)), |
|
uintptr(unsafe.Pointer(_script)), |
|
0, |
|
) |
|
if err != nil && !errors.Is(err, windows.ERROR_SUCCESS) { |
|
e.errorCallback(err) |
|
} |
|
} |
Error "Overlapped I/O operation is in progress" occurs if the length of the script parameter in Eval function is relatively long (approximately len(script) >= 9000). The corresponding Windows error code is 997.
Steps to reproduce:
- Download this project myproject.zip
- Run
wails dev
- Click the
Greet button
Then you will see the error message on the console.
I'm sorry to open a new issue, but I wanted to clarify that the previous issue was closed with the comment that it was fixed in v1.0.12. However, I have tested the latest version and can confirm that the problem still persists in v1.0.12.
go-webview2/pkg/edge/chromium.go
Lines 242 to 261 in 1cea6fa
Error "Overlapped I/O operation is in progress" occurs if the length of the
scriptparameter inEvalfunction is relatively long (approximatelylen(script) >= 9000). The corresponding Windows error code is 997.Steps to reproduce:
wails devGreetbuttonThen you will see the error message on the console.