pub trait EventTargetMethods<D: DomTypes> {
// Required methods
fn AddEventListener(
&self,
type_: DOMString,
callback: Option<Rc<EventListener<D>>>,
options: AddEventListenerOptionsOrBoolean<D>,
);
fn RemoveEventListener(
&self,
type_: DOMString,
callback: Option<Rc<EventListener<D>>>,
options: EventListenerOptionsOrBoolean,
);
fn DispatchEvent(
&self,
cx: &mut JSContext,
event: &D::Event,
) -> Fallible<bool>;
fn Constructor(
cx: &mut JSContext,
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
) -> Fallible<DomRoot<D::EventTarget>>;
}Required Methods§
fn AddEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener<D>>>, options: AddEventListenerOptionsOrBoolean<D>, )
fn RemoveEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener<D>>>, options: EventListenerOptionsOrBoolean, )
fn DispatchEvent(&self, cx: &mut JSContext, event: &D::Event) -> Fallible<bool>
fn Constructor( cx: &mut JSContext, global: &D::GlobalScope, proto: Option<HandleObject<'_>>, ) -> Fallible<DomRoot<D::EventTarget>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".