Struct livid_desktop::wv::Webview
source · [−]pub struct Webview { /* private fields */ }
Expand description
Webview wrapper
Implementations
sourceimpl Webview
impl Webview
sourcepub fn create(debug: bool) -> Webview
pub fn create(debug: bool) -> Webview
Create a Webview from an embedded fltk window. Requires that the window is already shown
sourcepub fn get_window(&self) -> *mut c_void
pub fn get_window(&self) -> *mut c_void
Get the webview window handle
Navigate to a url
sourcepub fn eval(&mut self, js: &str)
pub fn eval(&mut self, js: &str)
Evaluates arbitrary JavaScript code. Evaluation happens asynchronously
sourcepub fn dispatch<F>(&mut self, f: F) where
F: FnOnce(&mut Webview) + Send + 'static,
pub fn dispatch<F>(&mut self, f: F) where
F: FnOnce(&mut Webview) + Send + 'static,
Posts a function to be executed on the main thread
sourcepub fn bind<F>(&mut self, name: &str, f: F) where
F: FnMut(&str, &str),
pub fn bind<F>(&mut self, name: &str, f: F) where
F: FnMut(&str, &str),
Binds a native C callback so that it will appear under the given name as a global JavaScript function
sourcepub fn return(&self, seq: &str, status: i32, result: &str)
pub fn return(&self, seq: &str, status: i32, result: &str)
Allows to return a value from the native binding.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more