pub trait ServiceWorkerMethods {
// Required methods
fn ScriptURL(&self) -> USVString;
fn State(&self) -> ServiceWorkerState;
fn PostMessage(
&self,
cx: SafeJSContext,
message: HandleValue<'_>,
transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>,
) -> Result<(), Error>;
fn PostMessage_(
&self,
cx: SafeJSContext,
message: HandleValue<'_>,
options: RootedTraceableBox<StructuredSerializeOptions>,
) -> Result<(), Error>;
fn GetOnstatechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnstatechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull>>);
}