pub(crate) trait MessageEventMethods<D: DomTypes> {
    // Required methods
    fn Data(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>);
    fn Origin(&self) -> DOMString;
    fn LastEventId(&self) -> DOMString;
    fn GetSource(&self) -> Option<WindowProxyOrMessagePortOrServiceWorker<D>>;
    fn Ports(
        &self,
        cx: SafeJSContext,
        _can_gc: CanGc,
        retval: MutableHandleValue<'_>,
    );
    fn InitMessageEvent(
        &self,
        cx: SafeJSContext,
        type_: DOMString,
        bubbles: bool,
        cancelable: bool,
        data: HandleValue<'_>,
        origin: DOMString,
        lastEventId: DOMString,
        source: Option<WindowProxyOrMessagePortOrServiceWorker<D>>,
        ports: Vec<DomRoot<D::MessagePort>>,
    );
    fn IsTrusted(&self) -> bool;
    fn Constructor(
        global: &D::GlobalScope,
        proto: Option<HandleObject<'_>>,
        can_gc: CanGc,
        type_: DOMString,
        eventInitDict: RootedTraceableBox<MessageEventInit<D>>,
    ) -> Fallible<DomRoot<D::MessageEvent>>;
}

Required Methods§

Source

fn Data(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>)

Source

fn Origin(&self) -> DOMString

Source

fn LastEventId(&self) -> DOMString

Source

fn GetSource(&self) -> Option<WindowProxyOrMessagePortOrServiceWorker<D>>

Source

fn Ports( &self, cx: SafeJSContext, _can_gc: CanGc, retval: MutableHandleValue<'_>, )

Source

fn InitMessageEvent( &self, cx: SafeJSContext, type_: DOMString, bubbles: bool, cancelable: bool, data: HandleValue<'_>, origin: DOMString, lastEventId: DOMString, source: Option<WindowProxyOrMessagePortOrServiceWorker<D>>, ports: Vec<DomRoot<D::MessagePort>>, )

Source

fn IsTrusted(&self) -> bool

Source

fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, type_: DOMString, eventInitDict: RootedTraceableBox<MessageEventInit<D>>, ) -> Fallible<DomRoot<D::MessageEvent>>

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§