[−][src]Struct web_sys::EventTarget
The EventTarget
class.
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
.
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][−]
&self,
type_: &str,
listener: &Function
) -> Result<(), JsValue>
The addEventListener()
method.
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][−]
&self,
type_: &str,
listener: &Function,
options: bool
) -> Result<(), JsValue>
The addEventListener()
method.
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][−]
&self,
type_: &str,
listener: &Function,
options: bool,
wants_untrusted: Option<bool>
) -> Result<(), JsValue>
The addEventListener()
method.
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.
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][−]
&self,
type_: &str,
listener: &Function
) -> Result<(), JsValue>
The removeEventListener()
method.
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][−]
&self,
type_: &str,
listener: &Function,
options: bool
) -> Result<(), JsValue>
The removeEventListener()
method.
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][+]
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][+]
impl IntoWasmAbi for EventTarget
[src][+]
impl<'a> IntoWasmAbi for &'a EventTarget
[src][+]
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][+]
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src][+]
T: IntoWasmAbi,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,