func (_this *DetectedBarcode) BoundingBox() *geometry.DOMRectReadOnly {
	var ret *geometry.DOMRectReadOnly
	value := _this.Value_JS.Get("boundingBox")
	ret = geometry.DOMRectReadOnlyFromJS(value)
	return ret
}
BoundingBox returning attribute 'boundingBox' with
type geometry.DOMRectReadOnly (idl: DOMRectReadOnly).
package shapedetection
import "syscall/js"
import (
	"github.com/gowebapi/webapi/dom/geometry"
	"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 BarcodeFormat int
const (
	AztecBarcodeFormat BarcodeFormat = iota
	Code128BarcodeFormat
	Code39BarcodeFormat
	Code93BarcodeFormat
	CodabarBarcodeFormat
	DataMatrixBarcodeFormat
	Ean13BarcodeFormat
	Ean8BarcodeFormat
	ItfBarcodeFormat
	Pdf417BarcodeFormat
	QrCodeBarcodeFormat
	UnknownBarcodeFormat
	UpcABarcodeFormat
	UpcEBarcodeFormat
)
var barcodeFormatToWasmTable = []string{
	"aztec", "code_128", "code_39", "code_93", "codabar", "data_matrix", "ean_13", "ean_8", "itf", "pdf417", "qr_code", "unknown", "upc_a", "upc_e",
}
var barcodeFormatFromWasmTable = map[string]BarcodeFormat{
	"aztec": AztecBarcodeFormat, "code_128": Code128BarcodeFormat, "code_39": Code39BarcodeFormat, "code_93": Code93BarcodeFormat, "codabar": CodabarBarcodeFormat, "data_matrix": DataMatrixBarcodeFormat, "ean_13": Ean13BarcodeFormat, "ean_8": Ean8BarcodeFormat, "itf": ItfBarcodeFormat, "pdf417": Pdf417BarcodeFormat, "qr_code": QrCodeBarcodeFormat, "unknown": UnknownBarcodeFormat, "upc_a": UpcABarcodeFormat, "upc_e": UpcEBarcodeFormat,
}
func (this *BarcodeFormat) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this BarcodeFormat) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(barcodeFormatToWasmTable) {
		return barcodeFormatToWasmTable[idx]
	}
	panic("unknown input value")
}
func BarcodeFormatFromJS(value js.Value) BarcodeFormat {
	key := value.String()
	conv, ok := barcodeFormatFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type LandmarkType int
const (
	MouthLandmarkType LandmarkType = iota
	EyeLandmarkType
	NoseLandmarkType
)
var landmarkTypeToWasmTable = []string{
	"mouth", "eye", "nose",
}
var landmarkTypeFromWasmTable = map[string]LandmarkType{
	"mouth": MouthLandmarkType, "eye": EyeLandmarkType, "nose": NoseLandmarkType,
}
func (this *LandmarkType) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this LandmarkType) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(landmarkTypeToWasmTable) {
		return landmarkTypeToWasmTable[idx]
	}
	panic("unknown input value")
}
func LandmarkTypeFromJS(value js.Value) LandmarkType {
	key := value.String()
	conv, ok := landmarkTypeFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type PromiseSequenceBarcodeFormatOnFulfilledFunc func(value []BarcodeFormat)
type PromiseSequenceBarcodeFormatOnFulfilled js.Func
func PromiseSequenceBarcodeFormatOnFulfilledToJS(callback PromiseSequenceBarcodeFormatOnFulfilledFunc) *PromiseSequenceBarcodeFormatOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceBarcodeFormatOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 []BarcodeFormat  
		)
		__length0 := args[0].Length()
		__array0 := make([]BarcodeFormat, __length0, __length0)
		for __idx0 := 0; __idx0 < __length0; __idx0++ {
			var __seq_out0 BarcodeFormat
			__seq_in0 := args[0].Index(__idx0)
			__seq_out0 = BarcodeFormatFromJS(__seq_in0)
			__array0[__idx0] = __seq_out0
		}
		_p0 = __array0
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceBarcodeFormatOnFulfilledFromJS(_value js.Value) PromiseSequenceBarcodeFormatOnFulfilledFunc {
	return func(value []BarcodeFormat) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := js.Global().Get("Array").New(len(value))
		for __idx0, __seq_in0 := range value {
			__seq_out0 := __seq_in0.JSValue()
			_p0.SetIndex(__idx0, __seq_out0)
		}
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceBarcodeFormatOnRejectedFunc func(reason js.Value)
type PromiseSequenceBarcodeFormatOnRejected js.Func
func PromiseSequenceBarcodeFormatOnRejectedToJS(callback PromiseSequenceBarcodeFormatOnRejectedFunc) *PromiseSequenceBarcodeFormatOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceBarcodeFormatOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceBarcodeFormatOnRejectedFromJS(_value js.Value) PromiseSequenceBarcodeFormatOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceDetectedBarcodeOnFulfilledFunc func(value []*DetectedBarcode)
type PromiseSequenceDetectedBarcodeOnFulfilled js.Func
func PromiseSequenceDetectedBarcodeOnFulfilledToJS(callback PromiseSequenceDetectedBarcodeOnFulfilledFunc) *PromiseSequenceDetectedBarcodeOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceDetectedBarcodeOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 []*DetectedBarcode  
		)
		__length0 := args[0].Length()
		__array0 := make([]*DetectedBarcode, __length0, __length0)
		for __idx0 := 0; __idx0 < __length0; __idx0++ {
			var __seq_out0 *DetectedBarcode
			__seq_in0 := args[0].Index(__idx0)
			__seq_out0 = DetectedBarcodeFromJS(__seq_in0)
			__array0[__idx0] = __seq_out0
		}
		_p0 = __array0
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceDetectedBarcodeOnFulfilledFromJS(_value js.Value) PromiseSequenceDetectedBarcodeOnFulfilledFunc {
	return func(value []*DetectedBarcode) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := js.Global().Get("Array").New(len(value))
		for __idx0, __seq_in0 := range value {
			__seq_out0 := __seq_in0.JSValue()
			_p0.SetIndex(__idx0, __seq_out0)
		}
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceDetectedBarcodeOnRejectedFunc func(reason js.Value)
type PromiseSequenceDetectedBarcodeOnRejected js.Func
func PromiseSequenceDetectedBarcodeOnRejectedToJS(callback PromiseSequenceDetectedBarcodeOnRejectedFunc) *PromiseSequenceDetectedBarcodeOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceDetectedBarcodeOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceDetectedBarcodeOnRejectedFromJS(_value js.Value) PromiseSequenceDetectedBarcodeOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceDetectedFaceOnFulfilledFunc func(value []*DetectedFace)
type PromiseSequenceDetectedFaceOnFulfilled js.Func
func PromiseSequenceDetectedFaceOnFulfilledToJS(callback PromiseSequenceDetectedFaceOnFulfilledFunc) *PromiseSequenceDetectedFaceOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceDetectedFaceOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 []*DetectedFace  
		)
		__length0 := args[0].Length()
		__array0 := make([]*DetectedFace, __length0, __length0)
		for __idx0 := 0; __idx0 < __length0; __idx0++ {
			var __seq_out0 *DetectedFace
			__seq_in0 := args[0].Index(__idx0)
			__seq_out0 = DetectedFaceFromJS(__seq_in0)
			__array0[__idx0] = __seq_out0
		}
		_p0 = __array0
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceDetectedFaceOnFulfilledFromJS(_value js.Value) PromiseSequenceDetectedFaceOnFulfilledFunc {
	return func(value []*DetectedFace) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := js.Global().Get("Array").New(len(value))
		for __idx0, __seq_in0 := range value {
			__seq_out0 := __seq_in0.JSValue()
			_p0.SetIndex(__idx0, __seq_out0)
		}
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceDetectedFaceOnRejectedFunc func(reason js.Value)
type PromiseSequenceDetectedFaceOnRejected js.Func
func PromiseSequenceDetectedFaceOnRejectedToJS(callback PromiseSequenceDetectedFaceOnRejectedFunc) *PromiseSequenceDetectedFaceOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceDetectedFaceOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceDetectedFaceOnRejectedFromJS(_value js.Value) PromiseSequenceDetectedFaceOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type BarcodeDetectorOptions struct {
	Formats []BarcodeFormat
}
func (_this *BarcodeDetectorOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := js.Global().Get("Array").New(len(_this.Formats))
	for __idx0, __seq_in0 := range _this.Formats {
		__seq_out0 := __seq_in0.JSValue()
		value0.SetIndex(__idx0, __seq_out0)
	}
	out.Set("formats", value0)
	return out
}
func BarcodeDetectorOptionsFromJS(value js.Wrapper) *BarcodeDetectorOptions {
	input := value.JSValue()
	var out BarcodeDetectorOptions
	var (
		value0 []BarcodeFormat  
	)
	__length0 := input.Get("formats").Length()
	__array0 := make([]BarcodeFormat, __length0, __length0)
	for __idx0 := 0; __idx0 < __length0; __idx0++ {
		var __seq_out0 BarcodeFormat
		__seq_in0 := input.Get("formats").Index(__idx0)
		__seq_out0 = BarcodeFormatFromJS(__seq_in0)
		__array0[__idx0] = __seq_out0
	}
	value0 = __array0
	out.Formats = value0
	return &out
}
type FaceDetectorOptions struct {
	MaxDetectedFaces int
	FastMode         bool
}
func (_this *FaceDetectorOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.MaxDetectedFaces
	out.Set("maxDetectedFaces", value0)
	value1 := _this.FastMode
	out.Set("fastMode", value1)
	return out
}
func FaceDetectorOptionsFromJS(value js.Wrapper) *FaceDetectorOptions {
	input := value.JSValue()
	var out FaceDetectorOptions
	var (
		value0 int   
		value1 bool  
	)
	value0 = (input.Get("maxDetectedFaces")).Int()
	out.MaxDetectedFaces = value0
	value1 = (input.Get("fastMode")).Bool()
	out.FastMode = value1
	return &out
}
type Landmark struct {
	Locations *javascript.FrozenArray
	Type      LandmarkType
}
func (_this *Landmark) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Locations.JSValue()
	out.Set("locations", value0)
	value1 := _this.Type.JSValue()
	out.Set("type", value1)
	return out
}
func LandmarkFromJS(value js.Wrapper) *Landmark {
	input := value.JSValue()
	var out Landmark
	var (
		value0 *javascript.FrozenArray  
		value1 LandmarkType             
	)
	value0 = javascript.FrozenArrayFromJS(input.Get("locations"))
	out.Locations = value0
	value1 = LandmarkTypeFromJS(input.Get("type"))
	out.Type = value1
	return &out
}
type BarcodeDetector struct {
	Value_JS js.Value
}
func (_this *BarcodeDetector) JSValue() js.Value {
	return _this.Value_JS
}
func BarcodeDetectorFromJS(value js.Wrapper) *BarcodeDetector {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &BarcodeDetector{}
	ret.Value_JS = input
	return ret
}
func GetSupportedFormats() (_result *PromiseSequenceBarcodeFormat) {
	_klass := js.Global().Get("BarcodeDetector")
	_method := _klass.Get("getSupportedFormats")
	var (
		_args [0]interface{}
		_end  int
	)
	_returned := _method.Invoke(_args[0:_end]...)
	var (
		_converted *PromiseSequenceBarcodeFormat  
	)
	_converted = PromiseSequenceBarcodeFormatFromJS(_returned)
	_result = _converted
	return
}
func NewBarcodeDetector(barcodeDetectorOptions *BarcodeDetectorOptions) (_result *BarcodeDetector) {
	_klass := js.Global().Get("BarcodeDetector")
	var (
		_args [1]interface{}
		_end  int
	)
	if barcodeDetectorOptions != nil {
		_p0 := barcodeDetectorOptions.JSValue()
		_args[0] = _p0
		_end++
	}
	_returned := _klass.New(_args[0:_end]...)
	var (
		_converted *BarcodeDetector  
	)
	_converted = BarcodeDetectorFromJS(_returned)
	_result = _converted
	return
}
func (_this *BarcodeDetector) Detect(image *Union) (_result *PromiseSequenceDetectedBarcode) {
	var (
		_args [1]interface{}
		_end  int
	)
	_p0 := image.JSValue()
	_args[0] = _p0
	_end++
	_returned := _this.Value_JS.Call("detect", _args[0:_end]...)
	var (
		_converted *PromiseSequenceDetectedBarcode  
	)
	_converted = PromiseSequenceDetectedBarcodeFromJS(_returned)
	_result = _converted
	return
}
type DetectedBarcode struct {
	Value_JS js.Value
}
func (_this *DetectedBarcode) JSValue() js.Value {
	return _this.Value_JS
}
func DetectedBarcodeFromJS(value js.Wrapper) *DetectedBarcode {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &DetectedBarcode{}
	ret.Value_JS = input
	return ret
}