Struct dioxus_mobile::wry::webview::WebContext [−]
pub struct WebContext { /* fields omitted */ }
Expand description
A context that is shared between multiple WebView
s.
A browser would have a context for all the normal tabs and a different context for all the private/incognito tabs.
Implementations
impl WebContext
impl WebContext
pub fn new(data_directory: Option<PathBuf>) -> WebContext
pub fn new(data_directory: Option<PathBuf>) -> WebContext
Create a new WebContext
.
data_directory
:
- Whether the WebView window should have a custom user data path. This is useful in Windows
when a bundled application can’t have the webview data inside
Program Files
.
pub fn data_directory(&self) -> Option<&Path>
pub fn data_directory(&self) -> Option<&Path>
A reference to the data directory the context was created with.
pub fn set_allows_automation(&mut self, flag: bool)
pub fn set_allows_automation(&mut self, flag: bool)
Set if this context allows automation.
Note: This is currently only enforced on Linux, and has the stipulation that only 1 context allows automation at a time.
Trait Implementations
impl Debug for WebContext
impl Debug for WebContext
impl Default for WebContext
impl Default for WebContext
pub fn default() -> WebContext
pub fn default() -> WebContext
Returns the “default value” for a type. Read more