Struct web_sys::ServiceWorkerGlobalScope
source · #[repr(transparent)]pub struct ServiceWorkerGlobalScope { /* private fields */ }
Expand description
The ServiceWorkerGlobalScope
object
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
Implementations§
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn skip_waiting(&self) -> Result<Promise, JsValue>
pub fn skip_waiting(&self) -> Result<Promise, JsValue>
The skipWaiting()
method
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn registration(&self) -> ServiceWorkerRegistration
pub fn registration(&self) -> ServiceWorkerRegistration
The registration
getter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
, ServiceWorkerRegistration
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_oninstall(&self, oninstall: Option<&Function>)
pub fn set_oninstall(&self, oninstall: Option<&Function>)
The oninstall
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn onactivate(&self) -> Option<Function>
pub fn onactivate(&self) -> Option<Function>
The onactivate
getter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_onactivate(&self, onactivate: Option<&Function>)
pub fn set_onactivate(&self, onactivate: Option<&Function>)
The onactivate
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_onfetch(&self, onfetch: Option<&Function>)
pub fn set_onfetch(&self, onfetch: Option<&Function>)
The onfetch
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
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: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_onpush(&self, onpush: Option<&Function>)
pub fn set_onpush(&self, onpush: Option<&Function>)
The onpush
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn onpushsubscriptionchange(&self) -> Option<Function>
pub fn onpushsubscriptionchange(&self) -> Option<Function>
The onpushsubscriptionchange
getter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_onpushsubscriptionchange(
&self,
onpushsubscriptionchange: Option<&Function>
)
pub fn set_onpushsubscriptionchange(
&self,
onpushsubscriptionchange: Option<&Function>
)
The onpushsubscriptionchange
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn onnotificationclick(&self) -> Option<Function>
pub fn onnotificationclick(&self) -> Option<Function>
The onnotificationclick
getter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_onnotificationclick(&self, onnotificationclick: Option<&Function>)
pub fn set_onnotificationclick(&self, onnotificationclick: Option<&Function>)
The onnotificationclick
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn onnotificationclose(&self) -> Option<Function>
pub fn onnotificationclose(&self) -> Option<Function>
The onnotificationclose
getter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
sourcepub fn set_onnotificationclose(&self, onnotificationclose: Option<&Function>)
pub fn set_onnotificationclose(&self, onnotificationclose: Option<&Function>)
The onnotificationclose
setter
This API requires the following crate features to be activated: ServiceWorkerGlobalScope
Trait Implementations§
source§impl AsRef<EventTarget> for ServiceWorkerGlobalScope
impl AsRef<EventTarget> for ServiceWorkerGlobalScope
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for ServiceWorkerGlobalScope
impl AsRef<JsValue> for ServiceWorkerGlobalScope
source§impl AsRef<Object> for ServiceWorkerGlobalScope
impl AsRef<Object> for ServiceWorkerGlobalScope
source§impl AsRef<WorkerGlobalScope> for ServiceWorkerGlobalScope
impl AsRef<WorkerGlobalScope> for ServiceWorkerGlobalScope
source§fn as_ref(&self) -> &WorkerGlobalScope
fn as_ref(&self) -> &WorkerGlobalScope
source§impl Clone for ServiceWorkerGlobalScope
impl Clone for ServiceWorkerGlobalScope
source§fn clone(&self) -> ServiceWorkerGlobalScope
fn clone(&self) -> ServiceWorkerGlobalScope
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServiceWorkerGlobalScope
impl Debug for ServiceWorkerGlobalScope
source§impl From<JsValue> for ServiceWorkerGlobalScope
impl From<JsValue> for ServiceWorkerGlobalScope
source§fn from(obj: JsValue) -> ServiceWorkerGlobalScope
fn from(obj: JsValue) -> ServiceWorkerGlobalScope
source§impl From<ServiceWorkerGlobalScope> for EventTarget
impl From<ServiceWorkerGlobalScope> for EventTarget
source§fn from(obj: ServiceWorkerGlobalScope) -> EventTarget
fn from(obj: ServiceWorkerGlobalScope) -> EventTarget
source§impl From<ServiceWorkerGlobalScope> for JsValue
impl From<ServiceWorkerGlobalScope> for JsValue
source§fn from(obj: ServiceWorkerGlobalScope) -> JsValue
fn from(obj: ServiceWorkerGlobalScope) -> JsValue
source§impl From<ServiceWorkerGlobalScope> for Object
impl From<ServiceWorkerGlobalScope> for Object
source§fn from(obj: ServiceWorkerGlobalScope) -> Object
fn from(obj: ServiceWorkerGlobalScope) -> Object
source§impl From<ServiceWorkerGlobalScope> for WorkerGlobalScope
impl From<ServiceWorkerGlobalScope> for WorkerGlobalScope
source§fn from(obj: ServiceWorkerGlobalScope) -> WorkerGlobalScope
fn from(obj: ServiceWorkerGlobalScope) -> WorkerGlobalScope
source§impl<'a> IntoWasmAbi for &'a ServiceWorkerGlobalScope
impl<'a> IntoWasmAbi for &'a ServiceWorkerGlobalScope
source§impl JsCast for ServiceWorkerGlobalScope
impl JsCast for ServiceWorkerGlobalScope
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 ServiceWorkerGlobalScope
impl<'a> OptionIntoWasmAbi for &'a ServiceWorkerGlobalScope
source§impl RefFromWasmAbi for ServiceWorkerGlobalScope
impl RefFromWasmAbi for ServiceWorkerGlobalScope
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<ServiceWorkerGlobalScope>
type Anchor = ManuallyDrop<ServiceWorkerGlobalScope>
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 ServiceWorkerGlobalScope
impl Send for ServiceWorkerGlobalScope
impl Sync for ServiceWorkerGlobalScope
impl Unpin for ServiceWorkerGlobalScope
impl UnwindSafe for ServiceWorkerGlobalScope
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