BatteryStatusOptions Class

The host hooks of the Battery Status API (https://w3c.github.io/battery/, BrowsingContextOptions.BatteryStatus).

public sealed class BatteryStatusOptions

Constructors

NameDescription
BatteryStatusOptions()

BatteryStatusOptions()

public BatteryStatusOptions()

No documentation is available.

Properties

NameDescription
ProviderGets or sets the source of the battery status of the device (navigator.getBattery()), e.g. a BatteryStatusProvider whose BatteryStatusProvider.Status is set by the application, or a subclass that reads the battery of the operating system. A provider can be shared by several browsing contexts. The default is null: the user agent is unable to report the battery status, so the BatteryManager reports a fully charged battery that is plugged in (BatteryStatus.Default).

Gets or sets the source of the battery status of the device (navigator.getBattery()), e.g. a BatteryStatusProvider whose BatteryStatusProvider.Status is set by the application, or a subclass that reads the battery of the operating system. A provider can be shared by several browsing contexts. The default is null: the user agent is unable to report the battery status, so the BatteryManager reports a fully charged battery that is plugged in (BatteryStatus.Default).

public BatteryStatusProvider? Provider { get; init; }