wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
24.5k stars 1.18k forks source link

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

Open aishuaikang opened 1 year ago

aishuaikang commented 1 year ago

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 commented 1 year ago

@leaanthony

aishuaikang commented 12 months ago

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 commented 12 months ago
image

Is it difficult to achieve this part?

aishuaikang commented 12 months ago

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

leaanthony commented 12 months ago

Feel free to make a PR?