veko doc
Self-Contained API Reference • Gradual Types • Capabilities • Wasm Sandbox

ui/webview_win

lib/ui/webview_win.vk

lib/ui/webview_win.vk Pure-Veko Windows Edge WebView2 COM host & deterministic headless simulator. - Zero top-level mut globals: all state lives in WebViewHandle. - Zero .net imports or net/* builtins: offline html and veko:// work without .net. - Calls ffi/* builtins directly without use [ffi] so lib/ui/* operates under .ui.

signature
WebViewHandle = struct { id str, win_id str, parent_hwnd i64 = ..., headless bool = ..., backend enum = ..., dll_path str = ..., dll_h i64 = ..., env_ptr i64 = ..., ctrl_ptr i64 = ..., wv_ptr i64 = ..., env_cb_obj i64 = ..., ctrl_cb_obj i64 = ..., msg_cb_obj i64 = ..., ready bool = ..., allow_net bool = ..., url str = ..., html str = ..., pending_url str = ..., pending_html str = ..., pending_js block = ..., js_history block = ..., ipc_outbox block = ..., sim_ipc_events block = ..., x i64 = ..., y i64 = ..., w i64 = ..., h i64 = ... }
signature
to-wv-handle = fn [raw any] WebViewHandle
signature
classify-url = fn [url str] enum
signature
check-url-policy = fn [url str, allow_net bool] any
discover-webview2-dll fn caps: .env .fs
signature
discover-webview2-dll = fn [] map
wv-create fn caps: .ffi .env
signature
wv-create = fn [id str, win_id str, parent_hwnd i64, headless bool, allow_net bool, props map] WebViewHandle
signature
wv-set-bounds = fn [mut wv WebViewHandle, x i64, y i64, w i64, h i64]
signature
wv-navigate = fn [mut wv WebViewHandle, url str] any
signature
wv-set-html = fn [mut wv WebViewHandle, html str] any
signature
wv-eval-js = fn [mut wv WebViewHandle, js str] any
signature
wv-post-message = fn [mut wv WebViewHandle, msg str] any
signature
wv-handle-callback = fn [mut wv WebViewHandle, slot i64, a0 i64, a1 i64, a2 i64] block
signature
wv-sim-ipc = fn [mut wv WebViewHandle, payload str]
signature
wv-drain-sim-ipc = fn [mut wv WebViewHandle] block
wv-destroy fn caps: .ffi
signature
wv-destroy = fn [mut wv WebViewHandle]