ServiceWorkerRegistration

Struct ServiceWorkerRegistration 

Source
pub struct ServiceWorkerRegistration { /* private fields */ }
Expand description

The ServiceWorkerRegistration class.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Implementations§

Source§

impl ServiceWorkerRegistration

Source

pub fn installing(&self) -> Option<ServiceWorker>

Getter for the installing field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorker, ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn waiting(&self) -> Option<ServiceWorker>

Getter for the waiting field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorker, ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn active(&self) -> Option<ServiceWorker>

Getter for the active field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorker, ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn scope(&self) -> String

Getter for the scope field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn update_via_cache(&self) -> Result<ServiceWorkerUpdateViaCache, JsValue>

Getter for the updateViaCache field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration, ServiceWorkerUpdateViaCache

Source§

impl ServiceWorkerRegistration

Source

pub fn onupdatefound(&self) -> Option<Function>

Getter for the onupdatefound field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn set_onupdatefound(&self, value: Option<&Function>)

Setter for the onupdatefound field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn push_manager(&self) -> Result<PushManager, JsValue>

Getter for the pushManager field of this object.

MDN Documentation

This API requires the following crate features to be activated: PushManager, ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn get_notifications(&self) -> Result<Promise, JsValue>

The getNotifications() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn show_notification(&self, title: &str) -> Result<Promise, JsValue>

The showNotification() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn show_notification_with_options( &self, title: &str, options: &NotificationOptions, ) -> Result<Promise, JsValue>

The showNotification() method.

MDN Documentation

This API requires the following crate features to be activated: NotificationOptions, ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn unregister(&self) -> Result<Promise, JsValue>

The unregister() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Source§

impl ServiceWorkerRegistration

Source

pub fn update(&self) -> Result<Promise, JsValue>

The update() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Methods from Deref<Target = EventTarget>§

Source

pub fn add_event_listener_with_callback( &self, type_: &str, listener: &Function, ) -> Result<(), JsValue>

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

Source

pub fn add_event_listener_with_event_listener( &self, type_: &str, listener: &EventListener, ) -> Result<(), JsValue>

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventTarget