pub trait DedicatedWorkerGlobalScopeMethods<D: DomTypes> {
// Required methods
fn Name(&self) -> DOMString;
fn PostMessage(
&self,
cx: &mut JSContext,
message: HandleValue<'_>,
transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>,
) -> Fallible<()>;
fn PostMessage_(
&self,
cx: &mut JSContext,
message: HandleValue<'_>,
options: &StructuredSerializeOptions,
) -> Fallible<()>;
fn GetOnmessage(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnmessage(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnmessageerror(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnmessageerror(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn Close(&self);
fn RequestAnimationFrame(
&self,
callback: RootedCallback<FrameRequestCallback<D>>,
) -> Fallible<u32>;
fn CancelAnimationFrame(&self, handle: u32) -> Fallible<()>;
}Required Methods§
fn Name(&self) -> DOMString
fn PostMessage( &self, cx: &mut JSContext, message: HandleValue<'_>, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Fallible<()>
fn PostMessage_( &self, cx: &mut JSContext, message: HandleValue<'_>, options: &StructuredSerializeOptions, ) -> Fallible<()>
fn GetOnmessage( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnmessage( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnmessageerror( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnmessageerror( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn Close(&self)
fn RequestAnimationFrame( &self, callback: RootedCallback<FrameRequestCallback<D>>, ) -> Fallible<u32>
fn CancelAnimationFrame(&self, handle: u32) -> Fallible<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".