pub struct CefWebview<R: Runtime> { /* private fields */ }Expand description
Handle to a child webview created by the plugin.
Implementations§
Source§impl<R: Runtime> CefWebview<R>
impl<R: Runtime> CefWebview<R>
Sourcepub fn eval(&self, js: impl Into<String>) -> Result<()>
pub fn eval(&self, js: impl Into<String>) -> Result<()>
Evaluates JavaScript in the child webview.
Sourcepub fn insert_css(&self, css: &str) -> Result<String>
pub fn insert_css(&self, css: &str) -> Result<String>
Injects a stylesheet into the child webview and returns its key.
Sourcepub fn remove_inserted_css(&self, key: &str) -> Result<()>
pub fn remove_inserted_css(&self, key: &str) -> Result<()>
Removes a stylesheet previously inserted with Self::insert_css.
Navigates the child webview to url.
Sourcepub fn open_devtools(&self)
pub fn open_devtools(&self)
Opens the child webview devtools (debug builds only).
Sourcepub fn set_rect(&self, x: f64, y: f64, width: f64, height: f64) -> Result<()>
pub fn set_rect(&self, x: f64, y: f64, width: f64, height: f64) -> Result<()>
Moves and resizes the child webview. Values are logical pixels.
Sourcepub fn set_visible(&self, visible: bool) -> Result<()>
pub fn set_visible(&self, visible: bool) -> Result<()>
Shows or hides the child webview.
Trait Implementations§
Auto Trait Implementations§
impl<R> !RefUnwindSafe for CefWebview<R>
impl<R> !UnwindSafe for CefWebview<R>
impl<R> Freeze for CefWebview<R>
impl<R> Send for CefWebview<R>
impl<R> Sync for CefWebview<R>
impl<R> Unpin for CefWebview<R>
impl<R> UnsafeUnpin for CefWebview<R>where
Webview<R>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more