[−][src]Struct web_sys::EventTarget
The EventTarget object
This API requires the following crate features to be activated: EventTarget
Methods
impl EventTarget[src]
impl EventTargetpub fn new() -> Result<EventTarget, JsValue>[src]
pub fn new() -> Result<EventTarget, JsValue>The new EventTarget(..) constructor, creating a new instance of EventTarget
This API requires the following crate features to be activated: EventTarget
impl EventTarget[src]
impl EventTargetpub fn add_event_listener_with_callback(
&self,
type_: &str,
listener: &Function
) -> Result<(), JsValue>[src]
pub fn add_event_listener_with_callback(
&self,
type_: &str,
listener: &Function
) -> Result<(), JsValue>The addEventListener() method
This API requires the following crate features to be activated: EventTarget
impl EventTarget[src]
impl EventTargetpub fn add_event_listener_with_callback_and_bool(
&self,
type_: &str,
listener: &Function,
options: bool
) -> Result<(), JsValue>[src]
pub fn add_event_listener_with_callback_and_bool(
&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]
impl EventTargetpub 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]
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>The addEventListener() method
This API requires the following crate features to be activated: EventTarget
impl EventTarget[src]
impl EventTargetpub fn dispatch_event(&self, event: &Event) -> Result<bool, JsValue>[src]
pub fn dispatch_event(&self, event: &Event) -> Result<bool, JsValue>The dispatchEvent() method
This API requires the following crate features to be activated: Event, EventTarget
impl EventTarget[src]
impl EventTargetpub fn remove_event_listener_with_callback(
&self,
type_: &str,
listener: &Function
) -> Result<(), JsValue>[src]
pub fn remove_event_listener_with_callback(
&self,
type_: &str,
listener: &Function
) -> Result<(), JsValue>The removeEventListener() method
This API requires the following crate features to be activated: EventTarget
impl EventTarget[src]
impl EventTargetpub fn remove_event_listener_with_callback_and_bool(
&self,
type_: &str,
listener: &Function,
options: bool
) -> Result<(), JsValue>[src]
pub fn remove_event_listener_with_callback_and_bool(
&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 Document[src]
impl AsRef<EventTarget> for Documentfn as_ref(&self) -> &EventTarget[src]
fn as_ref(&self) -> &EventTargetimpl AsRef<EventTarget> for DocumentFragment[src]
impl AsRef<EventTarget> for DocumentFragmentfn as_ref(&self) -> &EventTarget[src]
fn as_ref(&self) -> &EventTargetimpl AsRef<EventTarget> for Element[src]
impl AsRef<EventTarget> for Elementfn as_ref(&self) -> &EventTarget[src]
fn as_ref(&self) -> &EventTargetimpl AsRef<JsValue> for EventTarget[src]
impl AsRef<JsValue> for EventTargetimpl AsRef<Object> for EventTarget[src]
impl AsRef<Object> for EventTargetimpl AsRef<EventTarget> for HtmlElement[src]
impl AsRef<EventTarget> for HtmlElementfn as_ref(&self) -> &EventTarget[src]
fn as_ref(&self) -> &EventTargetimpl AsRef<EventTarget> for Node[src]
impl AsRef<EventTarget> for Nodefn as_ref(&self) -> &EventTarget[src]
fn as_ref(&self) -> &EventTargetimpl AsRef<EventTarget> for Window[src]
impl AsRef<EventTarget> for Windowfn as_ref(&self) -> &EventTarget[src]
fn as_ref(&self) -> &EventTargetimpl From<Document> for EventTarget[src]
impl From<Document> for EventTargetfn from(obj: Document) -> EventTarget[src]
fn from(obj: Document) -> EventTargetimpl From<DocumentFragment> for EventTarget[src]
impl From<DocumentFragment> for EventTargetfn from(obj: DocumentFragment) -> EventTarget[src]
fn from(obj: DocumentFragment) -> EventTargetimpl From<Element> for EventTarget[src]
impl From<Element> for EventTargetfn from(obj: Element) -> EventTarget[src]
fn from(obj: Element) -> EventTargetimpl From<JsValue> for EventTarget[src]
impl From<JsValue> for EventTargetfn from(obj: JsValue) -> EventTarget[src]
fn from(obj: JsValue) -> EventTargetimpl From<EventTarget> for JsValue[src]
impl From<EventTarget> for JsValuefn from(obj: EventTarget) -> JsValue[src]
fn from(obj: EventTarget) -> JsValueimpl From<EventTarget> for Object[src]
impl From<EventTarget> for Objectfn from(obj: EventTarget) -> Object[src]
fn from(obj: EventTarget) -> Objectimpl From<HtmlElement> for EventTarget[src]
impl From<HtmlElement> for EventTargetfn from(obj: HtmlElement) -> EventTarget[src]
fn from(obj: HtmlElement) -> EventTargetimpl From<Node> for EventTarget[src]
impl From<Node> for EventTargetfn from(obj: Node) -> EventTarget[src]
fn from(obj: Node) -> EventTargetimpl From<Window> for EventTarget[src]
impl From<Window> for EventTargetfn from(obj: Window) -> EventTarget[src]
fn from(obj: Window) -> EventTargetimpl Clone for EventTarget[src]
impl Clone for EventTargetfn clone(&self) -> EventTarget[src]
fn clone(&self) -> EventTargetfn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for EventTarget[src]
impl Debug for EventTargetimpl Deref for EventTarget[src]
impl Deref for EventTargetimpl JsCast for EventTarget[src]
impl JsCast for EventTargetfn instanceof(val: &JsValue) -> bool[src]
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Self[src]
fn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self[src]
fn unchecked_from_js_ref(val: &JsValue) -> &Selffn is_instance_of<T>(&self) -> bool where
T: JsCast, [src]
fn is_instance_of<T>(&self) -> bool where
T: JsCast, Test whether this JS value is an instance of the type T. Read more
fn dyn_into<T>(self) -> Result<T, Self> where
T: JsCast, [src]
fn dyn_into<T>(self) -> Result<T, Self> where
T: JsCast, Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more
fn dyn_ref<T>(&self) -> Option<&T> where
T: JsCast, [src]
fn dyn_ref<T>(&self) -> Option<&T> where
T: JsCast, Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more
fn unchecked_into<T>(self) -> T where
T: JsCast, [src]
fn unchecked_into<T>(self) -> T where
T: JsCast, Performs a zero-cost unchecked cast into the specified type. Read more
fn unchecked_ref<T>(&self) -> &T where
T: JsCast, [src]
fn unchecked_ref<T>(&self) -> &T where
T: JsCast, Performs a zero-cost unchecked cast into a reference to the specified type. Read more
impl WasmDescribe for EventTarget[src]
impl WasmDescribe for EventTargetimpl IntoWasmAbi for EventTarget[src]
impl IntoWasmAbi for EventTargettype Abi = <JsValue as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abi[src]
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abiimpl<'a> IntoWasmAbi for &'a EventTarget[src]
impl<'a> IntoWasmAbi for &'a EventTargettype Abi = <&'a JsValue as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abi[src]
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abiimpl FromWasmAbi for EventTarget[src]
impl FromWasmAbi for EventTargettype Abi = <JsValue as FromWasmAbi>::Abi
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
unsafe fn from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self[src]
unsafe fn from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Selfimpl OptionFromWasmAbi for EventTarget[src]
impl OptionFromWasmAbi for EventTargetimpl RefFromWasmAbi for EventTarget[src]
impl RefFromWasmAbi for EventTargettype 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
unsafe fn ref_from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self::Anchor[src]
unsafe fn ref_from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self::Anchorimpl OptionIntoWasmAbi for EventTarget[src]
impl OptionIntoWasmAbi for EventTargetimpl<'a> OptionIntoWasmAbi for &'a EventTarget[src]
impl<'a> OptionIntoWasmAbi for &'a EventTargetAuto Trait Implementations
impl !Send for EventTarget
impl !Send for EventTargetimpl !Sync for EventTarget
impl !Sync for EventTargetBlanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T> ReturnWasmAbi for T where
T: IntoWasmAbi, [src]
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi, type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi[src]
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi