The webview module exposes webview-layer controls for the web content
embedded in a window (print, background color, devtools, zoom, browsing
data clearing), ported from the part of @tauri-apps/api/webview that
fits Ztron's one-webview-per-window architecture. A Webview is a
handle constructed by label.
The backend currently holds one webview per window (window and webview
share the same WKWebView/WebView2 instance), so Webview
position/size/visibility operations are congruent with the owning
window; same-window multi-webview, reparent and autoResize are reported
as false by Webview.capabilities() instead of silently no-op'ing.
webview is a framework built-in: its plugin:webview|* commands are
granted by the core:default permission set in a capability;
core:allow-webview_<cmd> (e.g.
core:allow-webview_clear_all_browsing_data) grants single commands.
No scope.
From examples/hello/frontend/src/main.ts (verification anchor
WEBVIEW_MODULE_OK:1):
toggleDevtools() resolves { supported, platform, reason? }: macOS
WKWebView has no public toggle, so the host reports
supported: false there (devtools are enabled in debug builds).
plugin:webview|* totals 7 commands: get_all_webviews,
capabilities, create (used by
webview-window), clear_all_browsing_data,
print, set_background_color, toggle_devtools. Full list in the
Commands Reference.
Applicable version: ztron 0.3.1