[−][src]Struct web_sys::EventTarget
The EventTarget
object
This API requires the following crate features to be activated: EventTarget
Methods
impl EventTarget
[src]
impl EventTarget
pub 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 EventTarget
pub 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 EventTarget
pub 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 EventTarget
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]
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 EventTarget
pub 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 EventTarget
pub 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 EventTarget
pub 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 Document
fn as_ref(&self) -> &EventTarget
[src]
fn as_ref(&self) -> &EventTarget
impl AsRef<EventTarget> for DocumentFragment
[src]
impl AsRef<EventTarget> for DocumentFragment
fn as_ref(&self) -> &EventTarget
[src]
fn as_ref(&self) -> &EventTarget
impl AsRef<EventTarget> for Element
[src]
impl AsRef<EventTarget> for Element
fn as_ref(&self) -> &EventTarget
[src]
fn as_ref(&self) -> &EventTarget
impl AsRef<JsValue> for EventTarget
[src]
impl AsRef<JsValue> for EventTarget
impl AsRef<Object> for EventTarget
[src]
impl AsRef<Object> for EventTarget
impl AsRef<EventTarget> for HtmlElement
[src]
impl AsRef<EventTarget> for HtmlElement
fn as_ref(&self) -> &EventTarget
[src]
fn as_ref(&self) -> &EventTarget
impl AsRef<EventTarget> for Node
[src]
impl AsRef<EventTarget> for Node
fn as_ref(&self) -> &EventTarget
[src]
fn as_ref(&self) -> &EventTarget
impl AsRef<EventTarget> for Window
[src]
impl AsRef<EventTarget> for Window
fn as_ref(&self) -> &EventTarget
[src]
fn as_ref(&self) -> &EventTarget
impl From<Document> for EventTarget
[src]
impl From<Document> for EventTarget
fn from(obj: Document) -> EventTarget
[src]
fn from(obj: Document) -> EventTarget
impl From<DocumentFragment> for EventTarget
[src]
impl From<DocumentFragment> for EventTarget
fn from(obj: DocumentFragment) -> EventTarget
[src]
fn from(obj: DocumentFragment) -> EventTarget
impl From<Element> for EventTarget
[src]
impl From<Element> for EventTarget
fn from(obj: Element) -> EventTarget
[src]
fn from(obj: Element) -> EventTarget
impl From<JsValue> for EventTarget
[src]
impl From<JsValue> for EventTarget
fn from(obj: JsValue) -> EventTarget
[src]
fn from(obj: JsValue) -> EventTarget
impl From<EventTarget> for JsValue
[src]
impl From<EventTarget> for JsValue
fn from(obj: EventTarget) -> JsValue
[src]
fn from(obj: EventTarget) -> JsValue
impl From<EventTarget> for Object
[src]
impl From<EventTarget> for Object
fn from(obj: EventTarget) -> Object
[src]
fn from(obj: EventTarget) -> Object
impl From<HtmlElement> for EventTarget
[src]
impl From<HtmlElement> for EventTarget
fn from(obj: HtmlElement) -> EventTarget
[src]
fn from(obj: HtmlElement) -> EventTarget
impl From<Node> for EventTarget
[src]
impl From<Node> for EventTarget
fn from(obj: Node) -> EventTarget
[src]
fn from(obj: Node) -> EventTarget
impl From<Window> for EventTarget
[src]
impl From<Window> for EventTarget
fn from(obj: Window) -> EventTarget
[src]
fn from(obj: Window) -> EventTarget
impl Clone for EventTarget
[src]
impl Clone for EventTarget
fn clone(&self) -> EventTarget
[src]
fn clone(&self) -> EventTarget
fn 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 EventTarget
impl Deref for EventTarget
[src]
impl Deref for EventTarget
impl JsCast for EventTarget
[src]
impl JsCast for EventTarget
fn instanceof(val: &JsValue) -> bool
[src]
fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
[src]
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
[src]
fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn 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 EventTarget
impl IntoWasmAbi for EventTarget
[src]
impl IntoWasmAbi for EventTarget
type 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::Abi
impl<'a> IntoWasmAbi for &'a EventTarget
[src]
impl<'a> IntoWasmAbi for &'a EventTarget
type 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::Abi
impl FromWasmAbi for EventTarget
[src]
impl FromWasmAbi for EventTarget
type 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) -> Self
impl OptionFromWasmAbi for EventTarget
[src]
impl OptionFromWasmAbi for EventTarget
impl RefFromWasmAbi for EventTarget
[src]
impl RefFromWasmAbi for EventTarget
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
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::Anchor
impl OptionIntoWasmAbi for EventTarget
[src]
impl OptionIntoWasmAbi for EventTarget
impl<'a> OptionIntoWasmAbi for &'a EventTarget
[src]
impl<'a> OptionIntoWasmAbi for &'a EventTarget
Auto Trait Implementations
impl !Send for EventTarget
impl !Send for EventTarget
impl !Sync for EventTarget
impl !Sync for EventTarget
Blanket 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 T
impl<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 T
impl<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) -> TypeId
impl<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