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

ui/webview_mac

lib/ui/webview_mac.vk

lib/ui/webview_mac.vk Pure-Veko macOS WKWebView host & deterministic headless simulator (Slice 3). - Zero top-level mut globals: all state lives in MacWebViewHandle. - Zero .net imports or net/* builtins: offline html, about:blank, veko://, data:text/html work without .net. - Calls ffi/* builtins directly inside tiny local ObjC helpers (no use [ffi]) so consumers work under .ui.

signature
MacWebViewHandle = struct { id str, win_id str, parent_view i64 = ..., ns_wv i64 = ..., ns_cfg i64 = ..., ns_ucc i64 = ..., headless bool = ..., backend enum = ..., allow_net bool = ..., ready bool = ..., url str = ..., html str = ..., js_history block = ..., ipc_outbox block = ..., sim_ipc_events block = ..., x i64 = ..., y i64 = ..., w i64 = ..., h i64 = ... }
signature
to-mac-wv = fn [raw any] MacWebViewHandle
mac-wv-create fn caps: .ffi
signature
mac-wv-create = fn [id str, win_id str, parent_view i64, delegate_obj i64, headless bool, allow_net bool, props map] MacWebViewHandle
signature
mac-wv-set-bounds = fn [mut h MacWebViewHandle, win_h i64, x i64, y i64, w i64, h_px i64]
signature
mac-wv-navigate = fn [mut h MacWebViewHandle, url str] any
signature
mac-wv-set-html = fn [mut h MacWebViewHandle, html str] any
signature
mac-wv-eval-js = fn [mut h MacWebViewHandle, js str] any
signature
mac-wv-post-message = fn [mut h MacWebViewHandle, msg str] any
signature
mac-wv-decode-ipc = fn [wk_msg_ptr i64] str
signature
mac-wv-sim-ipc = fn [mut h MacWebViewHandle, payload str]
signature
mac-wv-drain-sim-ipc = fn [mut h MacWebViewHandle] block
signature
mac-wv-destroy = fn [mut h MacWebViewHandle]