[][src]Struct webview2::WebView

pub struct WebView { /* fields omitted */ }

Wrapper for ICoreWebView2.

Methods

impl WebView[src]

pub fn into_inner(self) -> ComRc<dyn ICoreWebView2>[src]

pub fn as_inner(&self) -> &ComRc<dyn ICoreWebView2>[src]

impl WebView[src]

pub fn get_settings(&self) -> Result<Settings>[src]

pub fn get_source(&self) -> Result<String>[src]

pub fn navigate(&self, message_string: &str) -> Result<()>[src]

pub fn navigate_to_string(&self, message_string: &str) -> Result<()>[src]

pub fn add_navigation_starting(
    &self,
    handler: impl Fn(WebView, NavigationStartingEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_navigation_starting(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_content_loading(
    &self,
    handler: impl Fn(WebView, ContentLoadingEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_content_loading(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_source_changed(
    &self,
    handler: impl Fn(WebView, SourceChangedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_source_changed(&self, token: EventRegistrationToken) -> Result<()>[src]

pub fn add_history_changed(
    &self,
    event_handler: impl Fn(WebView) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_history_changed(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_navigation_completed(
    &self,
    handler: impl Fn(WebView, NavigationCompletedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_navigation_completed(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_frame_navigation_starting(
    &self,
    handler: impl Fn(WebView, NavigationStartingEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_frame_navigation_starting(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_script_dialog_opening(
    &self,
    handler: impl Fn(WebView, ScriptDialogOpeningEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_script_dialog_opening(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_permission_requested(
    &self,
    handler: impl Fn(WebView, PermissionRequestedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_permission_requested(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_process_failed(
    &self,
    handler: impl Fn(WebView, ProcessFailedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_process_failed(&self, token: EventRegistrationToken) -> Result<()>[src]

pub fn add_script_to_execute_on_document_created(
    &self,
    script: &str,
    callback: impl FnOnce(String) -> Result<()> + 'static
) -> Result<()>
[src]

pub fn remove_script_to_execute_on_document_created(
    &self,
    id: &str
) -> Result<()>
[src]

pub fn execute_script(
    &self,
    script: &str,
    callback: impl FnOnce(String) -> Result<()> + 'static
) -> Result<()>
[src]

pub fn add_document_title_changed(
    &self,
    event_handler: impl Fn(WebView) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_document_title_changed(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn capture_preview(
    &self,
    image_format: CapturePreviewImageFormat,
    image_stream: Stream,
    handler: impl FnOnce(Result<()>) -> Result<()> + 'static
) -> Result<()>
[src]

pub fn reload(&self) -> Result<()>[src]

pub fn post_web_message_as_json(&self, message_string: &str) -> Result<()>[src]

pub fn post_web_message_as_string(&self, message_string: &str) -> Result<()>[src]

pub fn add_web_message_received(
    &self,
    handler: impl Fn(WebView, WebMessageReceivedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_web_message_received(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn get_browser_process_id(&self) -> Result<u32>[src]

pub fn get_can_go_back(&self) -> Result<bool>[src]

pub fn get_can_go_forward(&self) -> Result<bool>[src]

pub fn go_back(&self) -> Result<()>[src]

pub fn go_forward(&self) -> Result<()>[src]

pub fn stop(&self) -> Result<()>[src]

pub fn add_new_window_requested(
    &self,
    handler: impl Fn(WebView, NewWindowRequestedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_new_window_requested(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn get_document_title(&self) -> Result<String>[src]

pub fn open_dev_tools_window(&self) -> Result<()>[src]

pub fn add_contains_full_screen_element_changed(
    &self,
    event_handler: impl Fn(WebView) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_contains_full_screen_element_changed(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn get_contains_full_screen_element(&self) -> Result<bool>[src]

pub fn add_web_resource_requested(
    &self,
    handler: impl Fn(WebView, WebResourceRequestedEventArgs) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_web_resource_requested(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

pub fn add_web_resource_requested_filter(
    &self,
    uri: &str,
    resource_context: WebResourceContext
) -> Result<()>
[src]

pub fn remove_web_resource_requested_filter(
    &self,
    uri: &str,
    resource_context: WebResourceContext
) -> Result<()>
[src]

pub fn add_window_close_requested(
    &self,
    event_handler: impl Fn(WebView) -> Result<()> + 'static
) -> Result<EventRegistrationToken>
[src]

pub fn remove_window_close_requested(
    &self,
    token: EventRegistrationToken
) -> Result<()>
[src]

Trait Implementations

impl Clone for WebView[src]

impl Debug for WebView[src]

impl From<ComRc<dyn ICoreWebView2 + 'static>> for WebView[src]

Auto Trait Implementations

impl !RefUnwindSafe for WebView

impl !Send for WebView

impl !Sync for WebView

impl !Unpin for WebView

impl !UnwindSafe for WebView

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.