pub(crate) trait ServiceWorkerContainerMethods<D>where
D: DomTypes,{
// Required methods
fn GetController(&self) -> Option<Root<Dom<<D as DomTypes>::ServiceWorker>>>;
fn Register(
&self,
realm: &mut CurrentRealm<'_>,
scriptURL: USVString,
options: &RegistrationOptions,
) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot;
fn GetRegistration(
&self,
realm: &mut CurrentRealm<'_>,
clientURL: USVString,
) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot;
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>>>,
);
}Required Methods§
fn GetController(&self) -> Option<Root<Dom<<D as DomTypes>::ServiceWorker>>>
fn Register( &self, realm: &mut CurrentRealm<'_>, scriptURL: USVString, options: &RegistrationOptions, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot
fn GetRegistration( &self, realm: &mut CurrentRealm<'_>, clientURL: USVString, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot
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>>>, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".