Struct web_sys::ServiceWorkerContainer
source · #[repr(transparent)]pub struct ServiceWorkerContainer { /* private fields */ }
Expand description
The ServiceWorkerContainer
object
This API requires the following crate features to be activated: ServiceWorkerContainer
Implementations§
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn get_registration(&self) -> Promise
pub fn get_registration(&self) -> Promise
The getRegistration()
method
This API requires the following crate features to be activated: ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn get_registration_with_document_url(&self, document_url: &str) -> Promise
pub fn get_registration_with_document_url(&self, document_url: &str) -> Promise
The getRegistration()
method
This API requires the following crate features to be activated: ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn get_registrations(&self) -> Promise
pub fn get_registrations(&self) -> Promise
The getRegistrations()
method
This API requires the following crate features to be activated: ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn register_with_options(
&self,
script_url: &str,
options: &RegistrationOptions
) -> Promise
pub fn register_with_options(
&self,
script_url: &str,
options: &RegistrationOptions
) -> Promise
The register()
method
This API requires the following crate features to be activated: RegistrationOptions
, ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn controller(&self) -> Option<ServiceWorker>
pub fn controller(&self) -> Option<ServiceWorker>
The controller
getter
This API requires the following crate features to be activated: ServiceWorker
, ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn oncontrollerchange(&self) -> Option<Function>
pub fn oncontrollerchange(&self) -> Option<Function>
The oncontrollerchange
getter
This API requires the following crate features to be activated: ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn set_oncontrollerchange(&self, oncontrollerchange: Option<&Function>)
pub fn set_oncontrollerchange(&self, oncontrollerchange: Option<&Function>)
The oncontrollerchange
setter
This API requires the following crate features to be activated: ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn set_onerror(&self, onerror: Option<&Function>)
pub fn set_onerror(&self, onerror: Option<&Function>)
The onerror
setter
This API requires the following crate features to be activated: ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
source§impl ServiceWorkerContainer
impl ServiceWorkerContainer
sourcepub fn set_onmessage(&self, onmessage: Option<&Function>)
pub fn set_onmessage(&self, onmessage: Option<&Function>)
The onmessage
setter
This API requires the following crate features to be activated: ServiceWorkerContainer
Trait Implementations§
source§impl AsRef<EventTarget> for ServiceWorkerContainer
impl AsRef<EventTarget> for ServiceWorkerContainer
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for ServiceWorkerContainer
impl AsRef<JsValue> for ServiceWorkerContainer
source§impl AsRef<Object> for ServiceWorkerContainer
impl AsRef<Object> for ServiceWorkerContainer
source§impl Clone for ServiceWorkerContainer
impl Clone for ServiceWorkerContainer
source§fn clone(&self) -> ServiceWorkerContainer
fn clone(&self) -> ServiceWorkerContainer
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServiceWorkerContainer
impl Debug for ServiceWorkerContainer
source§impl From<JsValue> for ServiceWorkerContainer
impl From<JsValue> for ServiceWorkerContainer
source§fn from(obj: JsValue) -> ServiceWorkerContainer
fn from(obj: JsValue) -> ServiceWorkerContainer
source§impl From<ServiceWorkerContainer> for EventTarget
impl From<ServiceWorkerContainer> for EventTarget
source§fn from(obj: ServiceWorkerContainer) -> EventTarget
fn from(obj: ServiceWorkerContainer) -> EventTarget
source§impl From<ServiceWorkerContainer> for JsValue
impl From<ServiceWorkerContainer> for JsValue
source§fn from(obj: ServiceWorkerContainer) -> JsValue
fn from(obj: ServiceWorkerContainer) -> JsValue
source§impl From<ServiceWorkerContainer> for Object
impl From<ServiceWorkerContainer> for Object
source§fn from(obj: ServiceWorkerContainer) -> Object
fn from(obj: ServiceWorkerContainer) -> Object
source§impl FromWasmAbi for ServiceWorkerContainer
impl FromWasmAbi for ServiceWorkerContainer
source§impl<'a> IntoWasmAbi for &'a ServiceWorkerContainer
impl<'a> IntoWasmAbi for &'a ServiceWorkerContainer
source§impl IntoWasmAbi for ServiceWorkerContainer
impl IntoWasmAbi for ServiceWorkerContainer
source§impl JsCast for ServiceWorkerContainer
impl JsCast for ServiceWorkerContainer
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl<'a> OptionIntoWasmAbi for &'a ServiceWorkerContainer
impl<'a> OptionIntoWasmAbi for &'a ServiceWorkerContainer
source§impl RefFromWasmAbi for ServiceWorkerContainer
impl RefFromWasmAbi for ServiceWorkerContainer
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<ServiceWorkerContainer>
type Anchor = ManuallyDrop<ServiceWorkerContainer>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ServiceWorkerContainer
impl Send for ServiceWorkerContainer
impl Sync for ServiceWorkerContainer
impl Unpin for ServiceWorkerContainer
impl UnwindSafe for ServiceWorkerContainer
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more