Class PeriodicSyncEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalPeriodicSyncEvent interface of the 'Web Periodic Background Synchronization API' provides a way to run tasks in the service worker with network connectivity.
[Value("PeriodicSyncEvent")]
public class PeriodicSyncEvent : ExtendableEvent
- Inheritance
-
PeriodicSyncEvent
- Inherited Members
Remarks
An instance of this event is passed to the 'ServiceWorkerGlobalScope.Periodicsync' handler. This happens periodically, at an interval greater than or equal to that set in the 'PeriodicSyncManager.Register' method. Other implementation-specific factors such as the user's engagement with the site decide the actual interval.
-Richer offline experiences with the Periodic Background Sync API
Constructors
PeriodicSyncEvent()
public PeriodicSyncEvent()
PeriodicSyncEvent(string, PeriodicSyncEventInit)
NOTE
ExperimentalPeriodicSyncEvent() constructorcreates a new PeriodicSyncEvent object. This constructor is not typically
used. The browser creates these objects itself and provides them to
'ServiceWorkerGlobalScope.Periodicsync' callback.
public PeriodicSyncEvent(string type, PeriodicSyncEventInit init)
Parameters
typestringinitPeriodicSyncEventInit
Remarks
Properties
Tag
NOTE
Experimentaltag read-only property of thePeriodicSyncEvent interface returns the developer-defined identifier for
the 'PeriodicSyncEvent'. This is specified when calling the
'PeriodicSyncManager.Register' method of the
'PeriodicSyncManager' interface. Multiple tags can be used by the web app
to run different periodic tasks at different frequencies.
[Value("tag")]
public string Tag { get; }
Property Value
- string
Returns a 'String' of the defined identifier.