func MockSensorTypeFromJS(value js.Value) MockSensorType {
	key := value.String()
	conv, ok := mockSensorTypeFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
MockSensorTypeFromJS is converting a javascript value into
a MockSensorType enum value.
package sensor
import "syscall/js"
import (
	"github.com/gowebapi/webapi/dom/domcore"
	"github.com/gowebapi/webapi/javascript"
)
func unused(value interface{}) {
}
type Union struct {
	Value js.Value
}
func (u *Union) JSValue() js.Value {
	return u.Value
}
func UnionFromJS(value js.Value) *Union {
	return &Union{Value: value}
}
type LocalCoordinateSystem int
const (
	CoordinateSystemDevice LocalCoordinateSystem = iota
	CoordinateSystemScreen
)
var genericSensorLocalCoordinateSystemToWasmTable = []string{
	"device", "screen",
}
var genericSensorLocalCoordinateSystemFromWasmTable = map[string]LocalCoordinateSystem{
	"device": CoordinateSystemDevice, "screen": CoordinateSystemScreen,
}
func (this *LocalCoordinateSystem) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this LocalCoordinateSystem) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(genericSensorLocalCoordinateSystemToWasmTable) {
		return genericSensorLocalCoordinateSystemToWasmTable[idx]
	}
	panic("unknown input value")
}
func LocalCoordinateSystemFromJS(value js.Value) LocalCoordinateSystem {
	key := value.String()
	conv, ok := genericSensorLocalCoordinateSystemFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type MockSensorType int
const (
	AmbientLightMockSensorType MockSensorType = iota
	AccelerometerMockSensorType
	LinearAccelerationMockSensorType
	GravityMockSensorType
	GyroscopeMockSensorType
	MagnetometerMockSensorType
	UncalibratedMagnetometerMockSensorType
	AbsoluteOrientationMockSensorType
	RelativeOrientationMockSensorType
	GeolocationMockSensorType
	ProximityMockSensorType
)
var mockSensorTypeToWasmTable = []string{
	"ambient-light", "accelerometer", "linear-acceleration", "gravity", "gyroscope", "magnetometer", "uncalibrated-magnetometer", "absolute-orientation", "relative-orientation", "geolocation", "proximity",
}
var mockSensorTypeFromWasmTable = map[string]MockSensorType{
	"ambient-light": AmbientLightMockSensorType, "accelerometer": AccelerometerMockSensorType, "linear-acceleration": LinearAccelerationMockSensorType, "gravity": GravityMockSensorType, "gyroscope": GyroscopeMockSensorType, "magnetometer": MagnetometerMockSensorType, "uncalibrated-magnetometer": UncalibratedMagnetometerMockSensorType, "absolute-orientation": AbsoluteOrientationMockSensorType, "relative-orientation": RelativeOrientationMockSensorType, "geolocation": GeolocationMockSensorType, "proximity": ProximityMockSensorType,
}
func (this *MockSensorType) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this MockSensorType) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(mockSensorTypeToWasmTable) {
		return mockSensorTypeToWasmTable[idx]
	}
	panic("unknown input value")
}