Trait browser_window::prelude::BrowserWindowExt
source · pub trait BrowserWindowExt: BrowserWindowEventExt + Clone {
// Required methods
fn cookie_jar(&self) -> Option<CookieJarImpl>;
fn eval_js(
&self,
js: &str,
callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>),
callback_data: *mut ()
);
fn eval_js_threadsafe(
&self,
js: &str,
callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>),
callback_data: *mut ()
);
fn free(&self);
fn navigate(&self, uri: &str);
fn url<'a>(&'a self) -> Cow<'a, str>;
fn window(&self) -> WindowImpl;
fn new(
app: ApplicationImpl,
parent: WindowImpl,
source: Source,
title: &str,
width: Option<u32>,
height: Option<u32>,
options: &cbw_WindowOptions,
browser_window_options: &cbw_BrowserWindowOptions,
creation_callback: fn(bw: BrowserWindowImpl, data: *mut ()),
callback_data: *mut ()
);
}
Required Methods§
sourcefn eval_js(
&self,
js: &str,
callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>),
callback_data: *mut ()
)
fn eval_js( &self, js: &str, callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>), callback_data: *mut () )
Executes the given JavaScript string. The result will be provided by invoking the callback function.
sourcefn eval_js_threadsafe(
&self,
js: &str,
callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>),
callback_data: *mut ()
)
fn eval_js_threadsafe( &self, js: &str, callback: fn(bw: BrowserWindowImpl, data: *mut (), result: Result<JsValue, JsEvaluationError>), callback_data: *mut () )
Like eval_js
, except it can be called from any thread.
fn free(&self)
Causes the browser to navigate to the given URI.
fn url<'a>(&'a self) -> Cow<'a, str>
sourcefn window(&self) -> WindowImpl
fn window(&self) -> WindowImpl
Gives a handle to the underlying window.
fn new( app: ApplicationImpl, parent: WindowImpl, source: Source, title: &str, width: Option<u32>, height: Option<u32>, options: &cbw_WindowOptions, browser_window_options: &cbw_BrowserWindowOptions, creation_callback: fn(bw: BrowserWindowImpl, data: *mut ()), callback_data: *mut () )
Object Safety§
This trait is not object safe.