CoreWebView2ServiceWorkerManager.GetServiceWorkerRegistrationsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetServiceWorkerRegistrationsAsync() |
Gets a list of the service worker registrations under the same profile.
This method returns a list of
This method corresponds to the |
| GetServiceWorkerRegistrationsAsync(String) |
Gets the service worker registrations associated with the specified scope.
If a service worker has been registered for the given scope, it gets the
list of |
GetServiceWorkerRegistrationsAsync()
Gets a list of the service worker registrations under the same profile.
This method returns a list of CoreWebView2ServiceWorkerRegistration objects, each representing a service worker registration.
This method corresponds to the getRegistrations method of the ServiceWorkerContainer object in the DOM which returns a Promise that resolves to an array of ServiceWorkerRegistration objects. See the [MDN documentation](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistrations) for more information.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Web.WebView2.Core.CoreWebView2ServiceWorkerRegistration>> GetServiceWorkerRegistrationsAsync();
member this.GetServiceWorkerRegistrationsAsync : unit -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Web.WebView2.Core.CoreWebView2ServiceWorkerRegistration>>
Public Function GetServiceWorkerRegistrationsAsync () As Task(Of IReadOnlyList(Of CoreWebView2ServiceWorkerRegistration))
Returns
Applies to
GetServiceWorkerRegistrationsAsync(String)
Gets the service worker registrations associated with the specified scope.
If a service worker has been registered for the given scope, it gets the
list of CoreWebView2ServiceWorkerRegistration objects otherwise returns
empty list.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Web.WebView2.Core.CoreWebView2ServiceWorkerRegistration>> GetServiceWorkerRegistrationsAsync(string scope);
member this.GetServiceWorkerRegistrationsAsync : string -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Web.WebView2.Core.CoreWebView2ServiceWorkerRegistration>>
Public Function GetServiceWorkerRegistrationsAsync (scope As String) As Task(Of IReadOnlyList(Of CoreWebView2ServiceWorkerRegistration))
Parameters
- scope
- String