Struct fltk_webview::Webview
source · [−]pub struct Webview { /* private fields */ }
Expand description
Webview wrapper
Implementations
sourceimpl Webview
impl Webview
sourcepub fn create(debug: bool, win: &mut Window) -> Webview
pub fn create(debug: bool, win: &mut Window) -> Webview
Create a Webview from an embedded fltk window. Requires that the window is already shown
Navigate to a url
sourcepub fn eval(&self, js: &str)
pub fn eval(&self, js: &str)
Evaluates arbitrary JavaScript code. Evaluation happens asynchronously
sourcepub fn dispatch<F>(&mut self, f: F) where
F: FnOnce(Webview) + Send + 'static,
pub fn dispatch<F>(&mut self, f: F) where
F: FnOnce(Webview) + Send + 'static,
Posts a function to be executed on the main thread
sourcepub fn bind<F>(&self, name: &str, f: F) where
F: FnMut(&str, &str),
pub fn bind<F>(&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 unbind(&self, name: &str)
pub fn unbind(&self, name: &str)
Unbinds a native C callback so that it will appear under the given name as a global JavaScript function
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