mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 15:15:51 +01:00
fix(macos): fix print dialog not opening and add Window.Print() to runtime (#4290) The print dialog was not opening on macOS because the CGO windowPrint function was passing the wrong pointer type to NSPrintOperation's runOperationModalForWindow method. It was passing the raw void* window instead of the properly cast WebviewWindow* nsWindow. This also adds a Window.Print() method to the JavaScript runtime, allowing frontend code to trigger the print dialog directly without needing a Go binding. Changes: - Fix webview_window_darwin.go to use nsWindow instead of window - Add WindowPrint constant (51) and handler to messageprocessor_window.go - Add Print() method to window.ts in the runtime - Rebuild bundled runtime (runtime.js and runtime.debug.js) - Add print example in v3/examples/print to demonstrate both Go API and JS runtime methods - Update API documentation for Window.Print() in both Go and JavaScript references 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||