Documentation ¶
Overview ¶
Package netinfo is network information
Index ¶
- type ConnectionType
- type EffectiveConnectionType
- type NetworkInformation
- func (_this *NetworkInformation) AddEventChange(listener func(event *domcore.Event, currentTarget *NetworkInformation)) js.Func
- func (_this *NetworkInformation) Downlink() float64
- func (_this *NetworkInformation) DownlinkMax() float64
- func (_this *NetworkInformation) EffectiveType() EffectiveConnectionType
- func (_this *NetworkInformation) OnChange() domcore.EventHandlerFunc
- func (_this *NetworkInformation) Rtt() int
- func (_this *NetworkInformation) SaveData() bool
- func (_this *NetworkInformation) SetOnChange(listener func(event *domcore.Event, currentTarget *NetworkInformation)) js.Func
- func (_this *NetworkInformation) Type() ConnectionType
- type Union
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionType ¶
type ConnectionType int
enum: ConnectionType
const ( BluetoothConnectionType ConnectionType = iota CellularConnectionType EthernetConnectionType MixedConnectionType NoneConnectionType OtherConnectionType UnknownConnectionType WifiConnectionType WimaxConnectionType )
func ConnectionTypeFromJS ¶
func ConnectionTypeFromJS(value js.Value) ConnectionType
ConnectionTypeFromJS is converting a javascript value into a ConnectionType enum value.
func (*ConnectionType) JSValue ¶
func (this *ConnectionType) JSValue() js.Value
JSValue is converting this enum into a javascript object
func (ConnectionType) Value ¶
func (this ConnectionType) Value() string
Value is converting this into javascript defined string value
type EffectiveConnectionType ¶
type EffectiveConnectionType int
enum: EffectiveConnectionType
const (
Slow2gEffectiveConnectionType EffectiveConnectionType
)
func EffectiveConnectionTypeFromJS ¶
func EffectiveConnectionTypeFromJS(value js.Value) EffectiveConnectionType
EffectiveConnectionTypeFromJS is converting a javascript value into a EffectiveConnectionType enum value.
func (*EffectiveConnectionType) JSValue ¶
func (this *EffectiveConnectionType) JSValue() js.Value
JSValue is converting this enum into a javascript object
func (EffectiveConnectionType) Value ¶
func (this EffectiveConnectionType) Value() string
Value is converting this into javascript defined string value
type NetworkInformation ¶
type NetworkInformation struct {
domcore.EventTarget
}
class: NetworkInformation
func NetworkInformationFromJS ¶
func NetworkInformationFromJS(value js.Value) *NetworkInformation
NetworkInformationFromJS is casting a js.Value into NetworkInformation.
func NetworkInformationFromWrapper ¶
func NetworkInformationFromWrapper(input core.Wrapper) *NetworkInformation
NetworkInformationFromJS is casting from something that holds a js.Value into NetworkInformation.
func (*NetworkInformation) AddEventChange ¶
func (_this *NetworkInformation) AddEventChange(listener func(event *domcore.Event, currentTarget *NetworkInformation)) js.Func
AddChange is adding doing AddEventListener for 'Change' on target. This method is returning allocated javascript function that need to be released.
func (*NetworkInformation) Downlink ¶
func (_this *NetworkInformation) Downlink() float64
Downlink returning attribute 'downlink' with type float64 (idl: unrestricted double).
func (*NetworkInformation) DownlinkMax ¶
func (_this *NetworkInformation) DownlinkMax() float64
DownlinkMax returning attribute 'downlinkMax' with type float64 (idl: unrestricted double).
func (*NetworkInformation) EffectiveType ¶
func (_this *NetworkInformation) EffectiveType() EffectiveConnectionType
EffectiveType returning attribute 'effectiveType' with type EffectiveConnectionType (idl: EffectiveConnectionType).
func (*NetworkInformation) OnChange ¶
func (_this *NetworkInformation) OnChange() domcore.EventHandlerFunc
OnChange returning attribute 'onchange' with type domcore.EventHandler (idl: EventHandlerNonNull).
func (*NetworkInformation) Rtt ¶
func (_this *NetworkInformation) Rtt() int
Rtt returning attribute 'rtt' with type int (idl: unsigned long long).
func (*NetworkInformation) SaveData ¶
func (_this *NetworkInformation) SaveData() bool
SaveData returning attribute 'saveData' with type bool (idl: boolean).
func (*NetworkInformation) SetOnChange ¶
func (_this *NetworkInformation) SetOnChange(listener func(event *domcore.Event, currentTarget *NetworkInformation)) js.Func
SetOnChange is assigning a function to 'onchange'. This This method is returning allocated javascript function that need to be released.
func (*NetworkInformation) Type ¶
func (_this *NetworkInformation) Type() ConnectionType
Type returning attribute 'type' with type ConnectionType (idl: ConnectionType).