Print Dialog Test

Issue #4290: macOS Print dialog does not open

Test Instructions

  1. Click the "Print via Go API" button below, OR
  2. Use the menu: File > Print, OR
  3. Press Cmd+P

Expected: A print dialog should appear as a sheet attached to this window.

Bug: Before the fix, nothing happens when trying to print.

Test Actions

Ready to test...

Sample Content to Print

This is sample content that should appear in the print preview.

Technical Details:

The bug was caused by passing a raw void* pointer instead of the properly cast NSWindow* to runOperationModalForWindow:.

Note: window.print() may not be natively supported in WKWebView. The Go API uses NSPrintOperation instead.