pub struct BrowserWindow(/* private fields */);
Implementations§
Source§impl BrowserWindow
impl BrowserWindow
Sourcepub fn on_address_changed(&self) -> AddressChangedEvent
pub fn on_address_changed(&self) -> AddressChangedEvent
Whenver the address URI changes
Sourcepub fn on_console_message(&self) -> ConsoleMessageEvent
pub fn on_console_message(&self) -> ConsoleMessageEvent
When a console message is printend.
Sourcepub fn on_fullscreen_mode_changed(&self) -> FullscreenModeChangedEvent
pub fn on_fullscreen_mode_changed(&self) -> FullscreenModeChangedEvent
Whenever the browser goes into or out of full screen mode.
Sourcepub fn on_loading_progress_changed(&self) -> LoadingProgressChangedEvent
pub fn on_loading_progress_changed(&self) -> LoadingProgressChangedEvent
Loading progress updates
Sourcepub fn on_message(&self) -> MessageEvent
pub fn on_message(&self) -> MessageEvent
The event that will fire whenever invoke_extern
is called with JS on
the client side.
This event is implemented for all browser frameworks.
Whenever navigation has finished and the page has loaded.
Whenever navigation to a new link happens.
Sourcepub fn on_page_title_changed(&self) -> PageTitleChangedEvent
pub fn on_page_title_changed(&self) -> PageTitleChangedEvent
Whenver the page title changes.
pub fn on_status_message(&self) -> StatusMessageEvent
Sourcepub fn on_tooltip(&self) -> TooltipEvent
pub fn on_tooltip(&self) -> TooltipEvent
Whenever the browser is about to show a tooltip
Sourcepub fn on_auth_credentials(&self) -> AuthCredentialsEvent
pub fn on_auth_credentials(&self) -> AuthCredentialsEvent
Not implemented yet.
Sourcepub fn on_certificate_error(&self) -> CertificateErrorEvent
pub fn on_certificate_error(&self) -> CertificateErrorEvent
Not implemented yet.
Sourcepub fn on_download_progress(&self) -> DownloadProgressEvent
pub fn on_download_progress(&self) -> DownloadProgressEvent
Not implemented yet.
Sourcepub fn on_download_started(&self) -> DownloadStartedEvent
pub fn on_download_started(&self) -> DownloadStartedEvent
Not implemented yet.
Sourcepub fn on_favicon_changed(&self) -> FaviconChangedEvent
pub fn on_favicon_changed(&self) -> FaviconChangedEvent
Not implemented yet.
Sourcepub fn on_file_dialog(&self) -> FileDialogEvent
pub fn on_file_dialog(&self) -> FileDialogEvent
Not implemented yet.
Sourcepub fn on_key_press(&self) -> KeyPressEvent
pub fn on_key_press(&self) -> KeyPressEvent
Not implemented yet.
Sourcepub fn on_key_pressed(&self) -> KeyPressedEvent
pub fn on_key_pressed(&self) -> KeyPressedEvent
Not implemented yet.
Sourcepub fn on_scroll_offset_changed(&self) -> ScrollOffsetChangedEvent
pub fn on_scroll_offset_changed(&self) -> ScrollOffsetChangedEvent
Not implemented yet.
Sourcepub fn on_select_client_certificate(&self) -> SelectClientCertificateEvent
pub fn on_select_client_certificate(&self) -> SelectClientCertificateEvent
Not implemented yet.
Sourcepub fn on_start_dragging(&self) -> StartDraggingEvent
pub fn on_start_dragging(&self) -> StartDraggingEvent
Not implemented yet.
Sourcepub fn on_text_selection_changed(&self) -> TextSelectionChangedEvent
pub fn on_text_selection_changed(&self) -> TextSelectionChangedEvent
Not implemented yet.
Methods from Deref<Target = BrowserWindowHandle>§
Sourcepub fn app(&self) -> ApplicationHandle
pub fn app(&self) -> ApplicationHandle
Returns the application handle associated with this browser window.
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
.
There may be some discrepancies in what JS values are being returned for
the same code in different browser engines, or how accurate they are.
For example, Edge WebView2 doesn’t return JsValue::Undefined
, it uses
JsValue::Null
instead.
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(&self) -> Dims2D
pub fn opacity(&self) -> u8
pub fn position(&self) -> Pos2D
pub fn title(&self) -> String
pub fn window_dimensions(&self) -> Dims2D
Sourcepub fn hide(&self)
pub fn hide(&self)
Hides the window. Keep in mind that hiding the window is not the same as closing it. Hiding the window will keep it’s resources alive. If the window is hidden, and all window handles are gone, the memory is effectively leaked.
pub fn set_content_dimensions(&self, dimensions: Dims2D)
pub fn set_opacity(&self, opacity: u8)
pub fn set_position(&self, position: Pos2D)
pub fn set_title(&self, title: &str)
pub fn set_window_dimensions(&self, dimensions: Dims2D)
Trait Implementations§
Source§impl Clone for BrowserWindow
impl Clone for BrowserWindow
Source§fn clone(&self) -> BrowserWindow
fn clone(&self) -> BrowserWindow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more