pub struct ServiceWorkerRegistration { /* private fields */ }
Expand description
The ServiceWorkerRegistration
class.
This API requires the following crate features to be activated: ServiceWorkerRegistration
Implementations§
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn installing(&self) -> Option<ServiceWorker>
pub fn installing(&self) -> Option<ServiceWorker>
Getter for the installing
field of this object.
This API requires the following crate features to be activated: ServiceWorker
, ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn waiting(&self) -> Option<ServiceWorker>
pub fn waiting(&self) -> Option<ServiceWorker>
Getter for the waiting
field of this object.
This API requires the following crate features to be activated: ServiceWorker
, ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn active(&self) -> Option<ServiceWorker>
pub fn active(&self) -> Option<ServiceWorker>
Getter for the active
field of this object.
This API requires the following crate features to be activated: ServiceWorker
, ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn update_via_cache(&self) -> Result<ServiceWorkerUpdateViaCache, JsValue>
pub fn update_via_cache(&self) -> Result<ServiceWorkerUpdateViaCache, JsValue>
Getter for the updateViaCache
field of this object.
This API requires the following crate features to be activated: ServiceWorkerRegistration
, ServiceWorkerUpdateViaCache
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn onupdatefound(&self) -> Option<Function>
pub fn onupdatefound(&self) -> Option<Function>
Getter for the onupdatefound
field of this object.
This API requires the following crate features to be activated: ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn set_onupdatefound(&self, value: Option<&Function>)
pub fn set_onupdatefound(&self, value: Option<&Function>)
Setter for the onupdatefound
field of this object.
This API requires the following crate features to be activated: ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn push_manager(&self) -> Result<PushManager, JsValue>
pub fn push_manager(&self) -> Result<PushManager, JsValue>
Getter for the pushManager
field of this object.
This API requires the following crate features to be activated: PushManager
, ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn get_notifications(&self) -> Result<Promise, JsValue>
pub fn get_notifications(&self) -> Result<Promise, JsValue>
The getNotifications()
method.
This API requires the following crate features to be activated: ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn show_notification_with_options(
&self,
title: &str,
options: &NotificationOptions,
) -> Result<Promise, JsValue>
pub fn show_notification_with_options( &self, title: &str, options: &NotificationOptions, ) -> Result<Promise, JsValue>
The showNotification()
method.
This API requires the following crate features to be activated: NotificationOptions
, ServiceWorkerRegistration
Source§impl ServiceWorkerRegistration
impl ServiceWorkerRegistration
Sourcepub fn unregister(&self) -> Result<Promise, JsValue>
pub fn unregister(&self) -> Result<Promise, JsValue>
The unregister()
method.
This API requires the following crate features to be activated: ServiceWorkerRegistration
Methods from Deref<Target = EventTarget>§
Sourcepub fn add_event_listener_with_callback(
&self,
type_: &str,
listener: &Function,
) -> Result<(), JsValue>
pub fn add_event_listener_with_callback( &self, type_: &str, listener: &Function, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: EventTarget
Sourcepub fn add_event_listener_with_event_listener(
&self,
type_: &str,
listener: &EventListener,
) -> Result<(), JsValue>
pub fn add_event_listener_with_event_listener( &self, type_: &str, listener: &EventListener, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: EventListener
, EventTarget
Sourcepub fn add_event_listener_with_callback_and_add_event_listener_options(
&self,
type_: &str,
listener: &Function,
options: &AddEventListenerOptions,
) -> Result<(), JsValue>
pub fn add_event_listener_with_callback_and_add_event_listener_options( &self, type_: &str, listener: &Function, options: &AddEventListenerOptions, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: AddEventListenerOptions
, EventTarget
Sourcepub fn add_event_listener_with_event_listener_and_add_event_listener_options(
&self,
type_: &str,
listener: &EventListener,
options: &AddEventListenerOptions,
) -> Result<(), JsValue>
pub fn add_event_listener_with_event_listener_and_add_event_listener_options( &self, type_: &str, listener: &EventListener, options: &AddEventListenerOptions, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: AddEventListenerOptions
, EventListener
, EventTarget
Sourcepub fn add_event_listener_with_callback_and_bool(
&self,
type_: &str,
listener: &Function,
options: bool,
) -> Result<(), JsValue>
pub fn add_event_listener_with_callback_and_bool( &self, type_: &str, listener: &Function, options: bool, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: EventTarget
Sourcepub fn add_event_listener_with_event_listener_and_bool(
&self,
type_: &str,
listener: &EventListener,
options: bool,
) -> Result<(), JsValue>
pub fn add_event_listener_with_event_listener_and_bool( &self, type_: &str, listener: &EventListener, options: bool, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: EventListener
, EventTarget
Sourcepub fn add_event_listener_with_callback_and_add_event_listener_options_and_wants_untrusted(
&self,
type_: &str,
listener: &Function,
options: &AddEventListenerOptions,
wants_untrusted: Option<bool>,
) -> Result<(), JsValue>
pub fn add_event_listener_with_callback_and_add_event_listener_options_and_wants_untrusted( &self, type_: &str, listener: &Function, options: &AddEventListenerOptions, wants_untrusted: Option<bool>, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: AddEventListenerOptions
, EventTarget
Sourcepub fn add_event_listener_with_event_listener_and_add_event_listener_options_and_wants_untrusted(
&self,
type_: &str,
listener: &EventListener,
options: &AddEventListenerOptions,
wants_untrusted: Option<bool>,
) -> Result<(), JsValue>
pub fn add_event_listener_with_event_listener_and_add_event_listener_options_and_wants_untrusted( &self, type_: &str, listener: &EventListener, options: &AddEventListenerOptions, wants_untrusted: Option<bool>, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: AddEventListenerOptions
, EventListener
, EventTarget
Sourcepub fn add_event_listener_with_callback_and_bool_and_wants_untrusted(
&self,
type_: &str,
listener: &Function,
options: bool,
wants_untrusted: Option<bool>,
) -> Result<(), JsValue>
pub fn add_event_listener_with_callback_and_bool_and_wants_untrusted( &self, type_: &str, listener: &Function, options: bool, wants_untrusted: Option<bool>, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: EventTarget
Sourcepub fn add_event_listener_with_event_listener_and_bool_and_wants_untrusted(
&self,
type_: &str,
listener: &EventListener,
options: bool,
wants_untrusted: Option<bool>,
) -> Result<(), JsValue>
pub fn add_event_listener_with_event_listener_and_bool_and_wants_untrusted( &self, type_: &str, listener: &EventListener, options: bool, wants_untrusted: Option<bool>, ) -> Result<(), JsValue>
The addEventListener()
method.
This API requires the following crate features to be activated: EventListener
, EventTarget
Sourcepub fn dispatch_event(&self, event: &Event) -> Result<bool, JsValue>
pub fn dispatch_event(&self, event: &Event) -> Result<bool, JsValue>
The dispatchEvent()
method.
This API requires the following crate features to be activated: Event
, EventTarget
Sourcepub fn remove_event_listener_with_callback(
&self,
type_: &str,
listener: &Function,
) -> Result<(), JsValue>
pub fn remove_event_listener_with_callback( &self, type_: &str, listener: &Function, ) -> Result<(), JsValue>
The removeEventListener()
method.
This API requires the following crate features to be activated: EventTarget
Sourcepub fn remove_event_listener_with_event_listener(
&self,
type_: &str,
listener: &EventListener,
) -> Result<(), JsValue>
pub fn remove_event_listener_with_event_listener( &self, type_: &str, listener: &EventListener, ) -> Result<(), JsValue>
The removeEventListener()
method.
This API requires the following crate features to be activated: EventListener
, EventTarget
Sourcepub fn remove_event_listener_with_callback_and_event_listener_options(
&self,
type_: &str,
listener: &Function,
options: &EventListenerOptions,
) -> Result<(), JsValue>
pub fn remove_event_listener_with_callback_and_event_listener_options( &self, type_: &str, listener: &Function, options: &EventListenerOptions, ) -> Result<(), JsValue>
The removeEventListener()
method.
This API requires the following crate features to be activated: EventListenerOptions
, EventTarget
Sourcepub fn remove_event_listener_with_event_listener_and_event_listener_options(
&self,
type_: &str,
listener: &EventListener,
options: &EventListenerOptions,
) -> Result<(), JsValue>
pub fn remove_event_listener_with_event_listener_and_event_listener_options( &self, type_: &str, listener: &EventListener, options: &EventListenerOptions, ) -> Result<(), JsValue>
The removeEventListener()
method.
This API requires the following crate features to be activated: EventListener
, EventListenerOptions
, EventTarget
Sourcepub fn remove_event_listener_with_callback_and_bool(
&self,
type_: &str,
listener: &Function,
options: bool,
) -> Result<(), JsValue>
pub fn remove_event_listener_with_callback_and_bool( &self, type_: &str, listener: &Function, options: bool, ) -> Result<(), JsValue>
The removeEventListener()
method.
This API requires the following crate features to be activated: EventTarget