pub struct Browser { /* private fields */ }Expand description
A thin layer on top of webkit2gtk::WebView to put helper methods into.
Implementations§
Source§impl Browser
impl Browser
Sourcepub fn attach_to(&self, window: &Window)
pub fn attach_to(&self, window: &Window)
Add this browser instance’s webview to the given GTK Window.
Sourcepub fn load_uri(&self, uri: &str)
pub fn load_uri(&self, uri: &str)
Delegates to webkit2gtk::WebView
Sourcepub fn reload(&self)
pub fn reload(&self)
Delegates to webkit2gtk::WebView
Sourcepub fn zoom_reset(&self)
pub fn zoom_reset(&self)
Reset to the base zoom level defined in the config (which defaults to 100%).
Sourcepub fn get_page_state(&self) -> PageState
pub fn get_page_state(&self) -> PageState
Get the deserialized PageState from the current contents of the webview. This is later
rendered unchanged into the HTML content.
Sourcepub fn execute_js(&self, js_code: &'static str)
pub fn execute_js(&self, js_code: &'static str)
Execute some (async) javascript code in the webview, without checking the result other than printing a warning if it errors out.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Browser
impl RefUnwindSafe for Browser
impl !Send for Browser
impl !Sync for Browser
impl Unpin for Browser
impl UnwindSafe for Browser
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