Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The NetworkInformation.type
read-only property returns the type of connection a device is using to communicate with the network.
Note: This feature is available in Web Workers