BadgingOptions Class
The host hooks of the Badging API (https://w3c.github.io/badging/, BrowsingContextOptions.Badging).
public sealed class BadgingOptionsConstructors
| Name | Description |
|---|---|
| BadgingOptions() |
BadgingOptions()
public BadgingOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| RequiresNotificationsPermission | Gets or sets whether setting the badge requires the notifications permission (as Safari): the promises are rejected with a NotAllowedError when the permission is not granted. The default is false (as Chromium). |
| SetBadge | Gets or sets the callback that sets the badge of the application (navigator.setAppBadge() and navigator.clearAppBadge()), e.g. on the icon of the installed web application. The library checks the document (fully active, same origin as the top-level document) before calling it. The callback is invoked on the thread of the event loop, and must not block it. The default is null: the badge is not shown anywhere, and the promises are resolved. The first argument is the context of the global object that set the badge (see CallbackContext): its CallbackContext.Global is the window or the worker. |
RequiresNotificationsPermission
Badging.csSetBadge
Badging.csGets or sets the callback that sets the badge of the application (navigator.setAppBadge() and navigator.clearAppBadge()), e.g. on the icon of the installed web application. The library checks the document (fully active, same origin as the top-level document) before calling it. The callback is invoked on the thread of the event loop, and must not block it. The default is null: the badge is not shown anywhere, and the promises are resolved. The first argument is the context of the global object that set the badge (see CallbackContext): its CallbackContext.Global is the window or the worker.
public Action<CallbackContext, AppBadge>? SetBadge { get; init; }