Trait EventTargetMethods

Source
pub(crate) trait EventTargetMethods<D>
where D: DomTypes,
{ // Required methods fn AddEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener<D>>>, options: AddEventListenerOptionsOrBoolean, ); fn RemoveEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener<D>>>, options: EventListenerOptionsOrBoolean, ); fn DispatchEvent( &self, event: &<D as DomTypes>::Event, _can_gc: CanGc, ) -> Result<bool, Error>; fn Constructor( global: &<D as DomTypes>::GlobalScope, proto: Option<Handle<'_, *mut JSObject>>, can_gc: CanGc, ) -> Result<Root<Dom<<D as DomTypes>::EventTarget>>, Error>; }

Required Methods§

Source

fn AddEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener<D>>>, options: AddEventListenerOptionsOrBoolean, )

Source

fn RemoveEventListener( &self, type_: DOMString, callback: Option<Rc<EventListener<D>>>, options: EventListenerOptionsOrBoolean, )

Source

fn DispatchEvent( &self, event: &<D as DomTypes>::Event, _can_gc: CanGc, ) -> Result<bool, Error>

Source

fn Constructor( global: &<D as DomTypes>::GlobalScope, proto: Option<Handle<'_, *mut JSObject>>, can_gc: CanGc, ) -> Result<Root<Dom<<D as DomTypes>::EventTarget>>, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§