Trait script::dom::bindings::codegen::Bindings::EventTargetBinding::EventTarget_Binding::EventTargetMethods
source · pub trait EventTargetMethods<D: DomTypes> {
// Required methods
fn AddEventListener(
&self,
type_: DOMString,
callback: Option<Rc<EventListener>>,
options: AddEventListenerOptionsOrBoolean,
);
fn RemoveEventListener(
&self,
type_: DOMString,
callback: Option<Rc<EventListener>>,
options: EventListenerOptionsOrBoolean,
);
fn DispatchEvent(
&self,
event: &Event,
_can_gc: CanGc,
) -> Result<bool, Error>;
fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
) -> Result<Root<Dom<EventTarget>>, Error>;
}
Required Methods§
fn AddEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener>>, options: AddEventListenerOptionsOrBoolean, )
fn RemoveEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener>>, options: EventListenerOptionsOrBoolean, )
fn DispatchEvent(&self, event: &Event, _can_gc: CanGc) -> Result<bool, Error>
fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Result<Root<Dom<EventTarget>>, Error>
Object Safety§
This trait is not object safe.