[][src]Struct web_sys::EventTarget

#[repr(transparent)]pub struct EventTarget { /* fields omitted */ }
[]

The EventTarget class.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

Implementations

impl EventTarget[src][]

pub fn new() -> Result<EventTarget, JsValue>[src][]

The new EventTarget(..) constructor, creating a new instance of EventTarget.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

impl EventTarget[src][]

pub fn add_event_listener_with_callback(
    &self,
    type_: &str,
    listener: &Function
) -> Result<(), JsValue>
[src][]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

impl EventTarget[src][]

pub fn add_event_listener_with_callback_and_bool(
    &self,
    type_: &str,
    listener: &Function,
    options: bool
) -> Result<(), JsValue>
[src][]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

impl EventTarget[src][]

pub fn add_event_listener_with_callback_and_bool_and_wants_untrusted(
    &self,
    type_: &str,
    listener: &Function,
    options: bool,
    wants_untrusted: Option<bool>
) -> Result<(), JsValue>
[src][]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

impl EventTarget[src][]

pub fn dispatch_event(&self, event: &Event) -> Result<bool, JsValue>[src][]

The dispatchEvent() method.

MDN Documentation

This API requires the following crate features to be activated: Event, EventTarget

impl EventTarget[src][]

pub fn remove_event_listener_with_callback(
    &self,
    type_: &str,
    listener: &Function
) -> Result<(), JsValue>
[src][]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

impl EventTarget[src][]

pub fn remove_event_listener_with_callback_and_bool(
    &self,
    type_: &str,
    listener: &Function,
    options: bool
) -> Result<(), JsValue>
[src][]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

Trait Implementations

impl AsRef<EventTarget> for Element[src][+]

impl AsRef<EventTarget> for EventTarget[src][+]

impl AsRef<EventTarget> for HtmlElement[src][+]

impl AsRef<EventTarget> for HtmlTextAreaElement[src][+]

impl AsRef<EventTarget> for Node[src][+]

impl AsRef<EventTarget> for Worker[src][+]

impl AsRef<JsValue> for EventTarget[src][+]

impl AsRef<Object> for EventTarget[src][+]

impl Clone for EventTarget[src][+]

impl Debug for EventTarget[src][+]

impl Deref for EventTarget[src][+]

type Target = Object

The resulting type after dereferencing.

impl Eq for EventTarget[src]

impl From<Element> for EventTarget[src][+]

impl From<EventTarget> for JsValue[src][+]

impl From<EventTarget> for Object[src][+]

impl From<HtmlElement> for EventTarget[src][+]

impl From<HtmlTextAreaElement> for EventTarget[src][+]

impl From<JsValue> for EventTarget[src][+]

impl From<Node> for EventTarget[src][+]

impl From<Worker> for EventTarget[src][+]

impl FromWasmAbi for EventTarget[src][+]

type Abi = <JsValue as FromWasmAbi>::Abi

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for EventTarget[src][+]

type Abi = <JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl<'a> IntoWasmAbi for &'a EventTarget[src][+]

type Abi = <&'a JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl JsCast for EventTarget[src][+]

impl OptionFromWasmAbi for EventTarget[src][+]

impl OptionIntoWasmAbi for EventTarget[src][+]

impl<'a> OptionIntoWasmAbi for &'a EventTarget[src][+]

impl PartialEq<EventTarget> for EventTarget[src][+]

impl RefFromWasmAbi for EventTarget[src][+]

type Abi = <JsValue as RefFromWasmAbi>::Abi

The wasm ABI type references to Self are recovered from.

type Anchor = ManuallyDrop<EventTarget>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl StructuralEq for EventTarget[src]

impl StructuralPartialEq for EventTarget[src]

impl WasmDescribe for EventTarget[src][+]

Auto Trait Implementations

impl RefUnwindSafe for EventTarget

impl !Send for EventTarget

impl !Sync for EventTarget

impl Unpin for EventTarget

impl UnwindSafe for EventTarget

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> From<T> for T[src][+]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src][+]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

impl<T> ToOwned for T where
    T: Clone
[src][+]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

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

The type returned in the event of a conversion error.