类型 WebViewConfig
API 文档由 Go 源码生成,内容为英文。
type WebViewConfig struct {
// URL is loaded when the page opens, unless HTML is set.
URL string
// HTML is loaded instead of a URL, with BaseURL as its address.
HTML string
BaseURL string
// Scheme, when set, serves the custom scheme Scheme.Name (a page loads "name://host/path")
// from the application's own resources, without a server.
Scheme *WebScheme
// OnMessage receives what the page posts with window.viva.postMessage(text).
OnMessage func(text string)
// OnLoad reports the page's navigation.
OnLoad func(WebLoad)
}WebViewConfig describes a page to open.