Skip to main content

ServiceWorkerMethods

Trait ServiceWorkerMethods 

Source
pub trait ServiceWorkerMethods<D>
where D: DomTypes,
{ // Required methods fn ScriptURL(&self) -> USVString; fn State(&self) -> ServiceWorkerState; fn PostMessage( &self, cx: &mut JSContext, message: Handle<'_, Value>, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Result<(), Error>; fn PostMessage_( &self, cx: &mut JSContext, message: Handle<'_, Value>, options: &StructuredSerializeOptions, ) -> Result<(), Error>; fn GetOnstatechange( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>; fn SetOnstatechange( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, ); fn GetOnerror( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>; fn SetOnerror( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, ); }

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§