Update the netinfo IDL file (#11950)
diff --git a/interfaces/netinfo.idl b/interfaces/netinfo.idl
index 75edd35..3e6212c 100644
--- a/interfaces/netinfo.idl
+++ b/interfaces/netinfo.idl
@@ -4,42 +4,39 @@
// See: https://wicg.github.io/netinfo/
enum ConnectionType {
- "bluetooth",
- "cellular",
- "ethernet",
- "mixed",
- "none",
- "other",
- "unknown",
- "wifi",
- "wimax"
+ "bluetooth",
+ "cellular",
+ "ethernet",
+ "mixed",
+ "none",
+ "other",
+ "unknown",
+ "wifi",
+ "wimax"
};
+
enum EffectiveConnectionType {
- "2g",
- "3g",
- "4g",
- "slow-2g"
+ "2g",
+ "3g",
+ "4g",
+ "slow-2g"
};
-[NoInterfaceObject,
- Exposed=(Window,Worker)]
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorNetworkInformation {
- readonly attribute NetworkInformation connection;
+ readonly attribute NetworkInformation connection;
};
Navigator implements NavigatorNetworkInformation;
-
WorkerNavigator implements NavigatorNetworkInformation;
+
[Exposed=(Window,Worker)]
interface NetworkInformation : EventTarget {
- readonly attribute ConnectionType type;
- readonly attribute EffectiveConnectionType effectiveType;
- readonly attribute Megabit downlinkMax;
- readonly attribute Megabit downlink;
- readonly attribute Millisecond rtt;
- readonly attribute boolean saveData;
- attribute EventHandler onchange;
-};
-
-typedef unrestricted double Megabit;
-
-typedef unsigned long long Millisecond;
+ readonly attribute ConnectionType type;
+ readonly attribute EffectiveConnectionType effectiveType;
+ readonly attribute Megabit downlinkMax;
+ readonly attribute Megabit downlink;
+ readonly attribute Millisecond rtt;
+ readonly attribute boolean saveData;
+ attribute EventHandler onchange;
+};typedef unrestricted double Megabit;typedef unsigned long long Millisecond;