NetworkInformation Class
The network connection of the device (https://wicg.github.io/netinfo/#networkinformation-interface), returned by Navigator.Connection and WorkerNavigator.Connection: it is read from the NetworkInformationProvider of the browsing context (NetworkInformationOptions.Provider), and fires the change event when the connection changes.
public sealed class NetworkInformation : EventTarget- Inheritance
EventTargetNetworkInformation
Properties
| Name | Description |
|---|---|
| Downlink | Gets the effective bandwidth of the connection, in megabits per second, rounded to a multiple of 50 kilobits per second. |
| DownlinkMax | Gets the maximum bandwidth of the connection technology, in megabits per second, or positive infinity when it is unknown. |
| EffectiveType | Gets the effective type of the connection. |
| OnChange | Gets or sets the event handler of the change event. |
| Rtt | Gets the effective round-trip time of the connection, in milliseconds, rounded to a multiple of 50 milliseconds. |
| SaveData | Gets whether the user prefers a reduced data usage (https://wicg.github.io/savedata/): ClientHintsOptions.SaveData. |
| Type | Gets the type of the connection. |
Downlink
NetworkInformation.csGets the effective bandwidth of the connection, in megabits per second, rounded to a multiple of 50 kilobits per second.
public double Downlink { get; }DownlinkMax
NetworkInformation.csGets the maximum bandwidth of the connection technology, in megabits per second, or positive infinity when it is unknown.
public double DownlinkMax { get; }EffectiveType
NetworkInformation.csGets the effective type of the connection.
public EffectiveConnectionType EffectiveType { get; }OnChange
NetworkInformation.csGets or sets the event handler of the change event.
Gets the effective round-trip time of the connection, in milliseconds, rounded to a multiple of 50 milliseconds.
public ulong Rtt { get; }SaveData
NetworkInformation.csGets whether the user prefers a reduced data usage (https://wicg.github.io/savedata/): ClientHintsOptions.SaveData.
public bool SaveData { get; }Gets the type of the connection.
public ConnectionType Type { get; }