pub struct Webview { /* private fields */ }Expand description
A handle to the native CEF browser backing a Tauri webview.
This is the runtime-specific webview object exposed through
tauri_runtime::WebviewDispatch::with_webview.
Implementations§
Source§impl Webview
impl Webview
Sourcepub fn snapshot(&self) -> &WebviewSnapshot
pub fn snapshot(&self) -> &WebviewSnapshot
Returns the native state sampled for this with_webview callback.
Retaining the handle does not refresh this observation.
Returns read-only live navigation state for this native browser lifetime.
Unlike snapshot, this handle follows subsequent native frame events.
Sourcepub fn popups(&self) -> &[Webview]
pub fn popups(&self) -> &[Webview]
Native CEF-owned popup descendants sampled in this same UI-thread callback. Popup windows have no Tauri label and retain their actual CEF opener.
Sourcepub fn opener(&self) -> Option<&FrameNavigationState>
pub fn opener(&self) -> Option<&FrameNavigationState>
Exact native opener lifetime, if this is a CEF-owned popup.
Sourcepub fn for_document(&self, document: &NativeDocumentToken) -> Option<&Webview>
pub fn for_document(&self, document: &NativeDocumentToken) -> Option<&Webview>
Select an observed document within this runtime-owned browser family. The returned snapshot is valid only for the current native callback.
Sourcepub fn browser(&self) -> Browser
pub fn browser(&self) -> Browser
Returns the cef::Browser backing this webview.
From the browser you can reach the rest of the CEF API, such as the browser host, the main frame or the native window handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Webview
impl RefUnwindSafe for Webview
impl Send for Webview
impl Sync for Webview
impl Unpin for Webview
impl UnsafeUnpin for Webview
impl UnwindSafe for Webview
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
fn wrap_result(self) -> U
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.