Table of Contents

Class PeriodicSyncManager

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The PeriodicSyncManager interface of the 'Web Periodic Background Synchronization API' provides a way to register tasks to be run in a service worker at periodic intervals with network connectivity. These tasks are referred to as periodic background sync requests. Access PeriodicSyncManager through the 'ServiceWorkerRegistration.PeriodicSync'.
[Value("PeriodicSyncManager")]
public class PeriodicSyncManager
Inheritance
PeriodicSyncManager
Inherited Members

Remarks

Constructors

PeriodicSyncManager()

public PeriodicSyncManager()

Methods

GetTags()

NOTE
Experimental
The getTags() method of the
PeriodicSyncManager interface returns a {{jsxref('Promise')}} that
resolves with a list of 'String' objects representing the tags that are
currently registered for periodic syncing.
[Value("getTags")]
public Task<List<string>> GetTags()

Returns

Task<List<string>>

A 'Promise' which resolves with a list of 'String' objects
representing tags that are currently registered for periodic syncing.

Remarks

Register(string, BackgroundSyncOptions)

NOTE
Experimental
The register() method of the
PeriodicSyncManager interface registers a periodic sync request with the
browser with the specified tag and options. It returns a 'Promise' that
resolves when the registration completes.
[Value("register")]
public Task<GlobalObject.Undefined> Register(string tag, BackgroundSyncOptions options = null)

Parameters

tag string
options BackgroundSyncOptions

Returns

Task<GlobalObject.Undefined>

Returns a Promise that resolves with 'undefined'.

Remarks

Unregister(string)

NOTE
Experimental
The unregister() method of the
PeriodicSyncManager interface unregisters the periodic sync request
corresponding to the specified tag and returns a 'Promise' that resolves
when unregistration completes.
[Value("unregister")]
public Task<GlobalObject.Undefined> Unregister(string tag)

Parameters

tag string

Returns

Task<GlobalObject.Undefined>

Returns a Promise that resolves with 'undefined'.

Remarks