Struct GlobalEventHandlersEventMap

Source
pub struct GlobalEventHandlersEventMap(/* private fields */);

Implementations§

Source§

impl GlobalEventHandlersEventMap

Source

pub fn get_wheel(&self) -> WheelEvent

Source

pub fn set_wheel(&self, value: &WheelEvent)

Source

pub fn get_webkittransitionend(&self) -> Event

Source

pub fn set_webkittransitionend(&self, value: &Event)

Source

pub fn get_webkitanimationstart(&self) -> Event

Source

pub fn set_webkitanimationstart(&self, value: &Event)

Source

pub fn get_webkitanimationiteration(&self) -> Event

Source

pub fn set_webkitanimationiteration(&self, value: &Event)

Source

pub fn get_webkitanimationend(&self) -> Event

Source

pub fn set_webkitanimationend(&self, value: &Event)

Source

pub fn get_waiting(&self) -> Event

Source

pub fn set_waiting(&self, value: &Event)

Source

pub fn get_volumechange(&self) -> Event

Source

pub fn set_volumechange(&self, value: &Event)

Source

pub fn get_transitionstart(&self) -> TransitionEvent

Source

pub fn set_transitionstart(&self, value: &TransitionEvent)

Source

pub fn get_transitionrun(&self) -> TransitionEvent

Source

pub fn set_transitionrun(&self, value: &TransitionEvent)

Source

pub fn get_transitionend(&self) -> TransitionEvent

Source

pub fn set_transitionend(&self, value: &TransitionEvent)

Source

pub fn get_transitioncancel(&self) -> TransitionEvent

Source

pub fn set_transitioncancel(&self, value: &TransitionEvent)

Source

pub fn get_touchstart(&self) -> TouchEvent

Source

pub fn set_touchstart(&self, value: &TouchEvent)

Source

pub fn get_touchmove(&self) -> TouchEvent

Source

pub fn set_touchmove(&self, value: &TouchEvent)

Source

pub fn get_touchend(&self) -> TouchEvent

Source

pub fn set_touchend(&self, value: &TouchEvent)

Source

pub fn get_touchcancel(&self) -> TouchEvent

Source

pub fn set_touchcancel(&self, value: &TouchEvent)

Source

pub fn get_toggle(&self) -> Event

Source

pub fn set_toggle(&self, value: &Event)

Source

pub fn get_timeupdate(&self) -> Event

Source

pub fn set_timeupdate(&self, value: &Event)

Source

pub fn get_suspend(&self) -> Event

Source

pub fn set_suspend(&self, value: &Event)

Source

pub fn get_submit(&self) -> SubmitEvent

Source

pub fn set_submit(&self, value: &SubmitEvent)

Source

pub fn get_stalled(&self) -> Event

Source

pub fn set_stalled(&self, value: &Event)

Source

pub fn get_slotchange(&self) -> Event

Source

pub fn set_slotchange(&self, value: &Event)

Source

pub fn get_selectstart(&self) -> Event

Source

pub fn set_selectstart(&self, value: &Event)

Source

pub fn get_selectionchange(&self) -> Event

Source

pub fn set_selectionchange(&self, value: &Event)

Source

pub fn get_select(&self) -> Event

Source

pub fn set_select(&self, value: &Event)

Source

pub fn get_seeking(&self) -> Event

Source

pub fn set_seeking(&self, value: &Event)

Source

pub fn get_seeked(&self) -> Event

Source

pub fn set_seeked(&self, value: &Event)

Source

pub fn get_securitypolicyviolation(&self) -> SecurityPolicyViolationEvent

Source

pub fn set_securitypolicyviolation(&self, value: &SecurityPolicyViolationEvent)

Source

pub fn get_scrollend(&self) -> Event

Source

pub fn set_scrollend(&self, value: &Event)

Source

pub fn get_scroll(&self) -> Event

Source

pub fn set_scroll(&self, value: &Event)

Source

pub fn get_resize(&self) -> UIEvent

Source

pub fn set_resize(&self, value: &UIEvent)

Source

pub fn get_reset(&self) -> Event

Source

pub fn set_reset(&self, value: &Event)

Source

pub fn get_ratechange(&self) -> Event

Source

pub fn set_ratechange(&self, value: &Event)

Source

pub fn get_progress(&self) -> ProgressEvent

Source

pub fn set_progress(&self, value: &ProgressEvent)

Source

pub fn get_pointerup(&self) -> PointerEvent

Source

pub fn set_pointerup(&self, value: &PointerEvent)

Source

pub fn get_pointerover(&self) -> PointerEvent

Source

pub fn set_pointerover(&self, value: &PointerEvent)

Source

pub fn get_pointerout(&self) -> PointerEvent

Source

pub fn set_pointerout(&self, value: &PointerEvent)

Source

pub fn get_pointermove(&self) -> PointerEvent

Source

pub fn set_pointermove(&self, value: &PointerEvent)

Source

pub fn get_pointerleave(&self) -> PointerEvent

Source

pub fn set_pointerleave(&self, value: &PointerEvent)

Source

pub fn get_pointerenter(&self) -> PointerEvent

Source

pub fn set_pointerenter(&self, value: &PointerEvent)

Source

pub fn get_pointerdown(&self) -> PointerEvent

Source

pub fn set_pointerdown(&self, value: &PointerEvent)

Source

pub fn get_pointercancel(&self) -> PointerEvent

Source

pub fn set_pointercancel(&self, value: &PointerEvent)

Source

pub fn get_playing(&self) -> Event

Source

pub fn set_playing(&self, value: &Event)

Source

pub fn get_play(&self) -> Event

Source

pub fn set_play(&self, value: &Event)

Source

pub fn get_pause(&self) -> Event

Source

pub fn set_pause(&self, value: &Event)

Source

pub fn get_paste(&self) -> ClipboardEvent

Source

pub fn set_paste(&self, value: &ClipboardEvent)

Source

pub fn get_mouseup(&self) -> MouseEvent

Source

pub fn set_mouseup(&self, value: &MouseEvent)

Source

pub fn get_mouseover(&self) -> MouseEvent

Source

pub fn set_mouseover(&self, value: &MouseEvent)

Source

pub fn get_mouseout(&self) -> MouseEvent

Source

pub fn set_mouseout(&self, value: &MouseEvent)

Source

pub fn get_mousemove(&self) -> MouseEvent

Source

pub fn set_mousemove(&self, value: &MouseEvent)

Source

pub fn get_mouseleave(&self) -> MouseEvent

Source

pub fn set_mouseleave(&self, value: &MouseEvent)

Source

pub fn get_mouseenter(&self) -> MouseEvent

Source

pub fn set_mouseenter(&self, value: &MouseEvent)

Source

pub fn get_mousedown(&self) -> MouseEvent

Source

pub fn set_mousedown(&self, value: &MouseEvent)

Source

pub fn get_lostpointercapture(&self) -> PointerEvent

Source

pub fn set_lostpointercapture(&self, value: &PointerEvent)

Source

pub fn get_loadstart(&self) -> Event

Source

pub fn set_loadstart(&self, value: &Event)

Source

pub fn get_loadedmetadata(&self) -> Event

Source

pub fn set_loadedmetadata(&self, value: &Event)

Source

pub fn get_loadeddata(&self) -> Event

Source

pub fn set_loadeddata(&self, value: &Event)

Source

pub fn get_load(&self) -> Event

Source

pub fn set_load(&self, value: &Event)

Source

pub fn get_keyup(&self) -> KeyboardEvent

Source

pub fn set_keyup(&self, value: &KeyboardEvent)

Source

pub fn get_keypress(&self) -> KeyboardEvent

Source

pub fn set_keypress(&self, value: &KeyboardEvent)

Source

pub fn get_keydown(&self) -> KeyboardEvent

Source

pub fn set_keydown(&self, value: &KeyboardEvent)

Source

pub fn get_invalid(&self) -> Event

Source

pub fn set_invalid(&self, value: &Event)

Source

pub fn get_input(&self) -> Event

Source

pub fn set_input(&self, value: &Event)

Source

pub fn get_gotpointercapture(&self) -> PointerEvent

Source

pub fn set_gotpointercapture(&self, value: &PointerEvent)

Source

pub fn get_formdata(&self) -> FormDataEvent

Source

pub fn set_formdata(&self, value: &FormDataEvent)

Source

pub fn get_focusout(&self) -> FocusEvent

Source

pub fn set_focusout(&self, value: &FocusEvent)

Source

pub fn get_focusin(&self) -> FocusEvent

Source

pub fn set_focusin(&self, value: &FocusEvent)

Source

pub fn get_focus(&self) -> FocusEvent

Source

pub fn set_focus(&self, value: &FocusEvent)

Source

pub fn get_error(&self) -> ErrorEvent

Source

pub fn set_error(&self, value: &ErrorEvent)

Source

pub fn get_ended(&self) -> Event

Source

pub fn set_ended(&self, value: &Event)

Source

pub fn get_emptied(&self) -> Event

Source

pub fn set_emptied(&self, value: &Event)

Source

pub fn get_durationchange(&self) -> Event

Source

pub fn set_durationchange(&self, value: &Event)

Source

pub fn get_drop(&self) -> DragEvent

Source

pub fn set_drop(&self, value: &DragEvent)

Source

pub fn get_dragstart(&self) -> DragEvent

Source

pub fn set_dragstart(&self, value: &DragEvent)

Source

pub fn get_dragover(&self) -> DragEvent

Source

pub fn set_dragover(&self, value: &DragEvent)

Source

pub fn get_dragleave(&self) -> DragEvent

Source

pub fn set_dragleave(&self, value: &DragEvent)

Source

pub fn get_dragenter(&self) -> DragEvent

Source

pub fn set_dragenter(&self, value: &DragEvent)

Source

pub fn get_dragend(&self) -> DragEvent

Source

pub fn set_dragend(&self, value: &DragEvent)

Source

pub fn get_drag(&self) -> DragEvent

Source

pub fn set_drag(&self, value: &DragEvent)

Source

pub fn get_dblclick(&self) -> MouseEvent

Source

pub fn set_dblclick(&self, value: &MouseEvent)

Source

pub fn get_cut(&self) -> ClipboardEvent

Source

pub fn set_cut(&self, value: &ClipboardEvent)

Source

pub fn get_cuechange(&self) -> Event

Source

pub fn set_cuechange(&self, value: &Event)

Source

pub fn get_copy(&self) -> ClipboardEvent

Source

pub fn set_copy(&self, value: &ClipboardEvent)

Source

pub fn get_contextmenu(&self) -> MouseEvent

Source

pub fn set_contextmenu(&self, value: &MouseEvent)

Source

pub fn get_compositionupdate(&self) -> CompositionEvent

Source

pub fn set_compositionupdate(&self, value: &CompositionEvent)

Source

pub fn get_compositionstart(&self) -> CompositionEvent

Source

pub fn set_compositionstart(&self, value: &CompositionEvent)

Source

pub fn get_compositionend(&self) -> CompositionEvent

Source

pub fn set_compositionend(&self, value: &CompositionEvent)

Source

pub fn get_close(&self) -> Event

Source

pub fn set_close(&self, value: &Event)

Source

pub fn get_click(&self) -> MouseEvent

Source

pub fn set_click(&self, value: &MouseEvent)

Source

pub fn get_change(&self) -> Event

Source

pub fn set_change(&self, value: &Event)

Source

pub fn get_canplaythrough(&self) -> Event

Source

pub fn set_canplaythrough(&self, value: &Event)

Source

pub fn get_canplay(&self) -> Event

Source

pub fn set_canplay(&self, value: &Event)

Source

pub fn get_cancel(&self) -> Event

Source

pub fn set_cancel(&self, value: &Event)

Source

pub fn get_blur(&self) -> FocusEvent

Source

pub fn set_blur(&self, value: &FocusEvent)

Source

pub fn get_beforeinput(&self) -> InputEvent

Source

pub fn set_beforeinput(&self, value: &InputEvent)

Source

pub fn get_auxclick(&self) -> MouseEvent

Source

pub fn set_auxclick(&self, value: &MouseEvent)

Source

pub fn get_animationstart(&self) -> AnimationEvent

Source

pub fn set_animationstart(&self, value: &AnimationEvent)

Source

pub fn get_animationiteration(&self) -> AnimationEvent

Source

pub fn set_animationiteration(&self, value: &AnimationEvent)

Source

pub fn get_animationend(&self) -> AnimationEvent

Source

pub fn set_animationend(&self, value: &AnimationEvent)

Source

pub fn get_animationcancel(&self) -> AnimationEvent

Source

pub fn set_animationcancel(&self, value: &AnimationEvent)

Source

pub fn get_abort(&self) -> UIEvent

Source

pub fn set_abort(&self, value: &UIEvent)

Methods from Deref<Target = JsObject>§

Source

pub fn js_get_field(&self, property: &dyn UseInJsCode) -> JsValue

Get a field value of in this object.

WSDOM provides built-in getters so you should use that instead when possible.

Use js_get_field only when needed

fn example(browser: Browser) {
    // you can get `window["location"]["href"]` like this
    let href: JsValue = wsdom::dom::location(&browser).js_get_field(&"href");

    // but you should use built-in getters instead
    let href: JsString = wsdom::dom::location(&browser).get_href();
}
Source

pub fn js_set_field(&self, property: &dyn UseInJsCode, value: &dyn UseInJsCode)

Set a field value of in this object.

WSDOM provides built-in setters so you should use that instead when possible.

Use js_set_field only when needed

fn example(browser: Browser) {
    // you can set `window["location"]["href"]` like this
    wsdom::dom::location(&browser).js_set_field(&"href", &"https://example.com/");

    // but you should use built-in setters instead
    wsdom::dom::location(&browser).set_href(&"https://example.com");
}
Source

pub fn js_call_method<'a>( &'a self, method_name: &'a str, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue

Call a method on this object.

Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.

fn example(browser: &Browser) {
    let console = wsdom::dom::console(browser);
    // you can call console.log like this
    console.js_call_method("log", [&"hello" as &_], false);
     
    // but the better way is to use
    wsdom::dom::console(&browser).log(&[&"Hello" as &_]);
}

Be aware that the first argument (method_name) is NOT escaped.

Set last_arg_variadic to true if you want to “spread” the last argument as obj.method(arg1, arg2, ...arg3).

Source

pub fn js_call_self<'a>( &'a self, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue

Call this object: obj().

Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.

Methods from Deref<Target = JsValue>§

Source

pub fn browser(&self) -> &Browser

Source

pub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>

Retrive this value from the JS side to the Rust side. Returns Future whose output is a serde_json::Value.

§use wsdom::dom::Browser
§use wsdom::dom::HTMLInputElement;

async fn example(input: &HTMLInputElement) { let _val = input.get_value().retrieve_json().await; }

Trait Implementations§

Source§

impl AsRef<GlobalEventHandlersEventMap> for DocumentEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for GlobalEventHandlersEventMap

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for HTMLBodyElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for HTMLElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for HTMLFrameSetElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for HTMLMediaElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for HTMLVideoElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for MathMLElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for SVGElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for SVGSVGElementEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlersEventMap> for WindowEventMap

Source§

fn as_ref(&self) -> &GlobalEventHandlersEventMap

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<JsObject> for GlobalEventHandlersEventMap

Source§

fn as_ref(&self) -> &JsObject

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<JsValue> for GlobalEventHandlersEventMap

Source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for GlobalEventHandlersEventMap

Source§

fn clone(&self) -> GlobalEventHandlersEventMap

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for GlobalEventHandlersEventMap

Source§

type Target = JsObject

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Into<GlobalEventHandlersEventMap> for DocumentEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for HTMLBodyElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for HTMLElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for HTMLFrameSetElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for HTMLMediaElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for HTMLVideoElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for MathMLElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for SVGElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for SVGSVGElementEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlersEventMap> for WindowEventMap

Source§

fn into(self) -> GlobalEventHandlersEventMap

Converts this type into the (usually inferred) input type.
Source§

impl Into<JsObject> for GlobalEventHandlersEventMap

Source§

fn into(self) -> JsObject

Converts this type into the (usually inferred) input type.
Source§

impl Into<JsValue> for GlobalEventHandlersEventMap

Source§

fn into(self) -> JsValue

Converts this type into the (usually inferred) input type.
Source§

impl JsCast for GlobalEventHandlersEventMap

Source§

fn unchecked_from_js(val: JsValue) -> Self

Source§

fn unchecked_from_js_ref(val: &JsValue) -> &Self

Source§

fn unchecked_into<T>(self) -> T
where T: JsCast,

Source§

fn unchecked_ref<T>(&self) -> &T
where T: JsCast,

Source§

impl RefCast for GlobalEventHandlersEventMap

Source§

type From = JsValue

Source§

fn ref_cast(_from: &Self::From) -> &Self

Source§

fn ref_cast_mut(_from: &mut Self::From) -> &mut Self

Source§

impl UseInJsCode for GlobalEventHandlersEventMap

Source§

fn serialize_to(&self, buf: &mut Formatter<'_>) -> Result

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ToJs<T> for T
where T: UseInJsCode + ?Sized,