wails icon indicating copy to clipboard operation
wails copied to clipboard

!!! JavaScript API WindowSetSize return value is null, not promise

Open aishuaikang opened this issue 2 years ago • 5 comments

Description

JavaScript API WindowSetSize return value is null, not Promise

To Reproduce

Call JavaScript API WindowSetSize directly

Expected behaviour

The type signature is Promise, and the printed log is undefined

Screenshots

image image

Attempted Fixes

No response

System Details

DEB | Using go webview2loader
Wails CLI v2.3.1

Scanning system - Please wait (this may take a long time)...Done.

# System

OS           | Windows 10 Pro     
Version      | 2009 (Build: 22621)
ID           | 22H2
Go Version   | go1.20
Platform     | windows
Architecture | amd64

# Wails

Version | v2.3.1

# Dependencies

Dependency | Package Name | Status    | Version      
WebView2   | N/A          | Installed | 109.0.1518.70
npm        | N/A          | Installed | 9.3.1        
*upx       | N/A          | Installed | upx 4.0.2    
*nsis      | N/A          | Available |
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!
Optional package(s) installation details: 
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

No response

aishuaikang avatar Feb 05 '23 08:02 aishuaikang

@leaanthony

aishuaikang avatar Feb 09 '23 09:02 aishuaikang

This problem is caused by a runtime.d.ts generation error generated by wails dev. It has been half a year and has not been solved yet.

aishuaikang avatar Sep 18 '23 10:09 aishuaikang

image Is it difficult to achieve this part?

aishuaikang avatar Sep 18 '23 10:09 aishuaikang

And in some cases, I need to wait to modify the window size and execute some logic, but I need to wait asynchronously.

aishuaikang avatar Sep 18 '23 10:09 aishuaikang

Feel free to make a PR?

leaanthony avatar Sep 18 '23 10:09 leaanthony