summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/netinfo.idl
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/interfaces/netinfo.idl')
-rw-r--r--testing/web-platform/tests/interfaces/netinfo.idl43
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/netinfo.idl b/testing/web-platform/tests/interfaces/netinfo.idl
new file mode 100644
index 0000000000..ac5265dbeb
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/netinfo.idl
@@ -0,0 +1,43 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Network Information API (https://wicg.github.io/netinfo/)
+
+enum ConnectionType {
+ "bluetooth",
+ "cellular",
+ "ethernet",
+ "mixed",
+ "none",
+ "other",
+ "unknown",
+ "wifi",
+ "wimax"
+};
+
+enum EffectiveConnectionType {
+ "2g",
+ "3g",
+ "4g",
+ "slow-2g"
+};
+
+interface mixin NavigatorNetworkInformation {
+ [SameObject] readonly attribute NetworkInformation connection;
+};
+
+Navigator includes NavigatorNetworkInformation;
+WorkerNavigator includes 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;
+ attribute EventHandler onchange;
+};
+
+typedef unrestricted double Megabit;
+typedef unsigned long long Millisecond;