fix: save webview downloads natively + silence unused var warning
Combine and refine two community fixes:
- Save blob:/data:/Content-Disposition downloads via a native
WebViewWindowBuilder::on_download handler instead of routing bytes
through the Tauri IPC. The IPC origin (http://ipc.localhost) is blocked
by strict-CSP sites (e.g. Gemini) and is unreachable from sandboxed
iframes, so downloads silently failed while the page still reported
success. The native path is independent of the page CSP and the IPC
channel. (closes #1157)
- Drop the document.createElement("a") interceptor and let blob:/data:
anchor clicks fall through to the native download path.
- Prefix the macOS-only `enable_find` binding with `_` to suppress the
unused-variable warning on Windows/Linux builds.
Refinements on top of the original PRs:
- Toast on failed downloads too (not only success), so a failure is never
silent again.
- Use `next_back()` instead of `last()` on the path-segment iterator.
Co-authored-by: Yushi47 <43625745+Yushi47@users.noreply.github.com>
Co-authored-by: reblox01 <74146687+reblox01@users.noreply.github.com>
https://claude.ai/code/session_018R2ceRrmzCUc13pSv9cXf5 C
Claude committed
e8a6804f2539ebe737d197d3a4fc1747380b1d4f
Parent: 9783d7e