Struct browser_window::browser::BrowserWindowHandle
source · pub struct BrowserWindowHandle { /* private fields */ }
Expand description
This is a handle to an existing browser window.
Implementations§
source§impl BrowserWindowHandle
impl BrowserWindowHandle
sourcepub fn app(&self) -> ApplicationHandle
pub fn app(&self) -> ApplicationHandle
Returns the application handle associated with this browser window.
pub fn close(self)
sourcepub async fn eval_js(&self, js: &str) -> Result<JsValue, JsEvaluationError>
pub async fn eval_js(&self, js: &str) -> Result<JsValue, JsEvaluationError>
Executes the given javascript code and returns the output as a string.
If you don’t need the result, see exec_js
.
sourcepub fn exec_js(&self, js: &str)
pub fn exec_js(&self, js: &str)
Executes the given javascript code without waiting on it to finish.
Causes the browser to navigate to the given url.
pub fn url<'a>(&'a self) -> Cow<'a, str>
pub fn window(&self) -> WindowHandle
Methods from Deref<Target = WindowHandle>§
pub fn content_dimensions<'a>(&'a self) -> ContentDimensions<'_>
pub fn opacity<'a>(&'a self) -> Opacity<'_>
pub fn position<'a>(&'a self) -> Position<'_>
pub fn title<'a>(&'a self) -> Title<'_>
pub fn window_dimensions<'a>(&'a self) -> WindowDimensions<'_>
Trait Implementations§
source§impl Clone for BrowserWindowHandle
impl Clone for BrowserWindowHandle
source§fn clone(&self) -> BrowserWindowHandle
fn clone(&self) -> BrowserWindowHandle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl HasAppHandle for BrowserWindowHandle
impl HasAppHandle for BrowserWindowHandle
fn app_handle(&self) -> ApplicationHandle
Auto Trait Implementations§
impl RefUnwindSafe for BrowserWindowHandle
impl !Send for BrowserWindowHandle
impl !Sync for BrowserWindowHandle
impl Unpin for BrowserWindowHandle
impl UnwindSafe for BrowserWindowHandle
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