pub trait BroadcastChannelMethods<D: DomTypes> {
// Required methods
fn Name(&self) -> DOMString;
fn PostMessage(
&self,
cx: &mut JSContext,
message: HandleValue<'_>,
) -> Fallible<()>;
fn Close(&self);
fn GetOnmessage(
&self,
cx: &mut JSContext,
) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnmessage(
&self,
cx: &mut JSContext,
value: Option<Rc<EventHandlerNonNull<D>>>,
);
fn GetOnmessageerror(
&self,
cx: &mut JSContext,
) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnmessageerror(
&self,
cx: &mut JSContext,
value: Option<Rc<EventHandlerNonNull<D>>>,
);
fn Constructor(
cx: &mut JSContext,
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
name: DOMString,
) -> DomRoot<D::BroadcastChannel>;
}Required Methods§
fn Name(&self) -> DOMString
fn PostMessage( &self, cx: &mut JSContext, message: HandleValue<'_>, ) -> Fallible<()>
fn Close(&self)
fn GetOnmessage(&self, cx: &mut JSContext) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnmessage( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, )
fn GetOnmessageerror( &self, cx: &mut JSContext, ) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnmessageerror( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, )
fn Constructor( cx: &mut JSContext, global: &D::GlobalScope, proto: Option<HandleObject<'_>>, name: DOMString, ) -> DomRoot<D::BroadcastChannel>
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.