pub struct JsHandle { /* private fields */ }Expand description
A handle for running JavaScript in a web view. Copy, like Trigger, so it can be captured by
several closures. Bind it with WebView::js; evaluating before the view is realized fails
with EvalError::ViewGone.
Implementations§
Source§impl JsHandle
impl JsHandle
Sourcepub fn renderer(&self) -> WebRenderer
pub fn renderer(&self) -> WebRenderer
Engine currently attached to this handle.
pub fn new() -> Self
Read URL, title, loading status and actual native history availability. Emulated iframe hosts return Unsupported rather than guessing browser history.
Read cookies (including HttpOnly) eligible for this URL from the bound view’s profile. Treat the returned header as a credential; never log it or send it to a different origin.
Store an HTTP Set-Cookie response in the browser’s own jar.
Sourcepub fn clear_data(&self) -> EvalFuture ⓘ
pub fn clear_data(&self) -> EvalFuture ⓘ
Clear all browser data in this profile. Use a dedicated site profile to forget one site. Await completion before reusing its cookies or allowing another request to that site.
Trait Implementations§
Auto Trait Implementations§
impl !Send for JsHandle
impl !Sync for JsHandle
impl Freeze for JsHandle
impl RefUnwindSafe for JsHandle
impl Unpin for JsHandle
impl UnsafeUnpin for JsHandle
impl UnwindSafe for JsHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more