pub(crate) trait EventTargetMethods<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::Event, _can_gc: CanGc) -> Fallible<bool>;
    fn Constructor(
        global: &D::GlobalScope,
        proto: Option<HandleObject<'_>>,
        can_gc: CanGc,
    ) -> Fallible<DomRoot<D::EventTarget>>;
}

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::Event, _can_gc: CanGc) -> Fallible<bool>

Source

fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Fallible<DomRoot<D::EventTarget>>

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§