func PushOptionsFromJS(value js.Wrapper) *PushOptions {
	input := value.JSValue()
	var out PushOptions
	var (
		value0 PushTarget            
		value1 float64               
		value2 bool                  
		value3 *domcore.AbortSignal  
		value4 NDEFCompatibility     
	)
	value0 = PushTargetFromJS(input.Get("target"))
	out.Target = value0
	value1 = (input.Get("timeout")).Float()
	out.Timeout = value1
	value2 = (input.Get("ignoreRead")).Bool()
	out.IgnoreRead = value2
	if input.Get("signal").Type() != js.TypeNull && input.Get("signal").Type() != js.TypeUndefined {
		value3 = domcore.AbortSignalFromJS(input.Get("signal"))
	}
	out.Signal = value3
	value4 = NDEFCompatibilityFromJS(input.Get("compatibility"))
	out.Compatibility = value4
	return &out
}
PushOptionsFromJS is allocating a new
PushOptions object and copy all values from
input javascript object
package nfc
import js "github.com/gowebapi/webapi/core/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 NDEFCompatibility int
const (
	CompatibilityNfcForum NDEFCompatibility = iota
	CompatibilityVendor
	CompatibilityAny
)
var nDEFCompatibilityToWasmTable = []string{
	"nfc-forum", "vendor", "any",
}
var nDEFCompatibilityFromWasmTable = map[string]NDEFCompatibility{
	"nfc-forum": CompatibilityNfcForum, "vendor": CompatibilityVendor, "any": CompatibilityAny,
}
func (this *NDEFCompatibility) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this NDEFCompatibility) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(nDEFCompatibilityToWasmTable) {
		return nDEFCompatibilityToWasmTable[idx]
	}
	panic("unknown input value")
}
func NDEFCompatibilityFromJS(value js.Value) NDEFCompatibility {
	key := value.String()
	conv, ok := nDEFCompatibilityFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type NDEFRecordType int
const (
	RecordEmpty NDEFRecordType = iota
	RecordText
	RecordUrl
	RecordJson
	RecordOpaque
)
var nDEFRecordTypeToWasmTable = []string{
	"empty", "text", "url", "json", "opaque",
}
var nDEFRecordTypeFromWasmTable = map[string]NDEFRecordType{
	"empty": RecordEmpty, "text": RecordText, "url": RecordUrl, "json": RecordJson, "opaque": RecordOpaque,
}
func (this *NDEFRecordType) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this NDEFRecordType) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(nDEFRecordTypeToWasmTable) {
		return nDEFRecordTypeToWasmTable[idx]
	}
	panic("unknown input value")
}
func NDEFRecordTypeFromJS(value js.Value) NDEFRecordType {
	key := value.String()
	conv, ok := nDEFRecordTypeFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type PushTarget int
const (
	PushTargetTag PushTarget = iota
	PushTargetPeer
	PushTargetAny
)
var nFCPushTargetToWasmTable = []string{
	"tag", "peer", "any",
}
var nFCPushTargetFromWasmTable = map[string]PushTarget{
	"tag": PushTargetTag, "peer": PushTargetPeer, "any": PushTargetAny,
}
func (this *PushTarget) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this PushTarget) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(nFCPushTargetToWasmTable) {
		return nFCPushTargetToWasmTable[idx]
	}
	panic("unknown input value")
}
func PushTargetFromJS(value js.Value) PushTarget {
	key := value.String()
	conv, ok := nFCPushTargetFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type ErrorEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Error      *domcore.DOMException
}
func (_this *ErrorEventInit) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Bubbles
	out.Set("bubbles", value0)
	value1 := _this.Cancelable
	out.Set("cancelable", value1)
	value2 := _this.Composed
	out.Set("composed", value2)
	value3 := _this.Error.JSValue()
	out.Set("error", value3)
	return out
}
func ErrorEventInitFromJS(value js.Wrapper) *ErrorEventInit {
	input := value.JSValue()
	var out ErrorEventInit
	var (
		value0 bool                   
		value1 bool                   
		value2 bool                   
		value3 *domcore.DOMException  
	)
	value0 = (input.Get("bubbles")).Bool()
	out.Bubbles = value0
	value1 = (input.Get("cancelable")).Bool()
	out.Cancelable = value1
	value2 = (input.Get("composed")).Bool()
	out.Composed = value2
	value3 = domcore.DOMExceptionFromJS(input.Get("error"))
	out.Error = value3
	return &out
}
type NDEFMessage struct {
	Records []*NDEFRecord
	Url     string
}
func (_this *NDEFMessage) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := js.Global().Get("Array").New(len(_this.Records))
	for __idx0, __seq_in0 := range _this.Records {
		__seq_out0 := __seq_in0.JSValue()
		value0.SetIndex(__idx0, __seq_out0)
	}
	out.Set("records", value0)
	value1 := _this.Url
	out.Set("url", value1)
	return out
}
func NDEFMessageFromJS(value js.Wrapper) *NDEFMessage {
	input := value.JSValue()
	var out NDEFMessage
	var (
		value0 []*NDEFRecord  
		value1 string         
	)
	__length0 := input.Get("records").Length()
	__array0 := make([]*NDEFRecord, __length0, __length0)
	for __idx0 := 0; __idx0 < __length0; __idx0++ {
		var __seq_out0 *NDEFRecord
		__seq_in0 := input.Get("records").Index(__idx0)
		__seq_out0 = NDEFRecordFromJS(__seq_in0)
		__array0[__idx0] = __seq_out0
	}
	value0 = __array0
	out.Records = value0
	value1 = (input.Get("url")).String()
	out.Url = value1
	return &out
}
type NDEFRecord struct {
	RecordType NDEFRecordType
	MediaType  string
	Data       *Union
}
func (_this *NDEFRecord) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.RecordType.JSValue()
	out.Set("recordType", value0)
	value1 := _this.MediaType
	out.Set("mediaType", value1)
	value2 := _this.Data.JSValue()
	out.Set("data", value2)
	return out
}
func NDEFRecordFromJS(value js.Wrapper) *NDEFRecord {
	input := value.JSValue()
	var out NDEFRecord
	var (
		value0 NDEFRecordType  
		value1 string          
		value2 *Union          
	)
	value0 = NDEFRecordTypeFromJS(input.Get("recordType"))
	out.RecordType = value0
	value1 = (input.Get("mediaType")).String()
	out.MediaType = value1
	value2 = UnionFromJS(input.Get("data"))
	out.Data = value2
	return &out
}
type PushOptions struct {
	Target        PushTarget
	Timeout       float64
	IgnoreRead    bool
	Signal        *domcore.AbortSignal
	Compatibility NDEFCompatibility
}
func (_this *PushOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Target.JSValue()
	out.Set("target", value0)
	value1 := _this.Timeout
	out.Set("timeout", value1)
	value2 := _this.IgnoreRead
	out.Set("ignoreRead", value2)
	value3 := _this.Signal.JSValue()
	out.Set("signal", value3)
	value4 := _this.Compatibility.JSValue()
	out.Set("compatibility", value4)
	return out
}