Struct wry::webview::WebView [−][src]
pub struct WebView { /* fields omitted */ }
The fundamental type to present a WebView
.
WebViewBuilder
/ WebView
are the basic building blocks to constrcut WebView contents and
scripts for those who prefer to control fine grained window creation and event handling.
WebView
presents the actuall WebView window and let you still able to perform actions
during event handling to it. WebView
also contains the associate Window
with it.
Implementations
impl WebView
[src]
impl WebView
[src]pub fn new(window: Window) -> Result<Self>
[src]
pub fn new(window: Window) -> Result<Self>
[src]Create a WebView
from provided Window
. Note that calling this directly loses
abilities to initialize scripts, add rpc handler, and many more before starting WebView. To
benefit from above features, create a WebViewBuilder
instead.
Platform-specific behavior:
- Unix: This method must be called in a gtk thread. Usually this means it should be
called in the same thread with the
EventLoop
you create.
pub fn dispatch_script(&mut self, js: &str) -> Result<()>
[src]
pub fn dispatch_script(&mut self, js: &str) -> Result<()>
[src]Dispatch javascript code to be evaluated later. Note this will not actually run the
scripts being dispatched. Users need to call WebView::evaluate_script
to execute them.
pub fn dispatcher(&self) -> Dispatcher
[src]
pub fn dispatcher(&self) -> Dispatcher
[src]Create a Dispatcher
to send evaluation scripts to the WebView. WebView
is not thread
safe because it must be run on the main thread who creates it. Dispatcher
can let you
send the scripts from other threads.
pub fn evaluate_script(&self) -> Result<()>
[src]
pub fn evaluate_script(&self) -> Result<()>
[src]Evaluate the scripts sent from Dispatcher
s.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for WebView
impl !Send for WebView
impl !Sync for WebView
impl Unpin for WebView
impl !UnwindSafe for WebView
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T