netinfo.idl (1031B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Network Information API (https://wicg.github.io/netinfo/) 5 6 enum ConnectionType { 7 "bluetooth", 8 "cellular", 9 "ethernet", 10 "mixed", 11 "none", 12 "other", 13 "unknown", 14 "wifi", 15 "wimax" 16 }; 17 18 enum EffectiveConnectionType { 19 "2g", 20 "3g", 21 "4g", 22 "slow-2g" 23 }; 24 25 interface mixin NavigatorNetworkInformation { 26 [SameObject] readonly attribute NetworkInformation connection; 27 }; 28 29 Navigator includes NavigatorNetworkInformation; 30 WorkerNavigator includes NavigatorNetworkInformation; 31 32 [Exposed=(Window,Worker)] 33 interface NetworkInformation : EventTarget { 34 readonly attribute ConnectionType type; 35 readonly attribute EffectiveConnectionType effectiveType; 36 readonly attribute Megabit downlinkMax; 37 readonly attribute Megabit downlink; 38 readonly attribute Millisecond rtt; 39 attribute EventHandler onchange; 40 }; 41 42 typedef unrestricted double Megabit; 43 typedef unsigned long long Millisecond;