pub struct WebProps {Show 14 fields
pub source: WebSource,
pub src: Option<Arc<str>>,
pub base_url: Option<Arc<str>>,
pub allow_origin: Option<WebOrigin>,
pub allow_navigation: Option<WebHosts>,
pub injected_js: Option<Arc<str>>,
pub injected_js_before: Option<Arc<str>>,
pub user_agent: Option<Arc<str>>,
pub scrollable: bool,
pub javascript_enabled: bool,
pub back_forward_gestures: bool,
pub incognito: bool,
pub zoomable: bool,
pub url_schemes: Vec<WebUrlScheme>,
/* private fields */
}Expand description
A web view.
Fields§
§source: WebSourceWhat it shows.
src: Option<Arc<str>>The src prop, which Self::source loads unless html is set.
base_url: Option<Arc<str>>The baseUrl prop, which Self::source holds while html is
set.
allow_origin: Option<WebOrigin>The one origin this web view may show besides webview.hosts
(allowOrigin, granted by webview.runtimeOrigin): a web view’s
backend checks its navigations with
Access::allows_webview_with.
The hosts this web view may show, narrower than the app’s grant
(allowNavigation; none: not narrowed). Checked with
Access::allows_webview_in.
injected_js: Option<Arc<str>>Script run after each page loads.
injected_js_before: Option<Arc<str>>Script run before each page’s own scripts.
user_agent: Option<Arc<str>>User agent; the platform’s when None.
scrollable: boolThe page scrolls.
javascript_enabled: boolThe page may run JavaScript.
back_forward_gestures: boolSwipes go back and forward (iOS).
incognito: boolWebsite data (cookies, storage, the cache) lives only as long as the web view, apart from the app’s other web views (Android: no HTTP cache and no saved form data). Read when the platform makes the web view: the core keeps it from changing afterwards.
zoomable: boolThe person can pinch to zoom the page, past its viewport’s scale
limits. Read when the platform makes the web view, as incognito.
url_schemes: Vec<WebUrlScheme>The URL schemes the page loads from the app
(crate::web_resource). Read when the platform makes the web
view, as incognito.