func DOMTokenListValueIteratorValueFromJS(value js.Wrapper) *DOMTokenListValueIteratorValue {
	input := value.JSValue()
	var out DOMTokenListValueIteratorValue
	var (
		value0 string  
		value1 bool    
	)
	value0 = (input.Get("value")).String()
	out.Value = value0
	value1 = (input.Get("done")).Bool()
	out.Done = value1
	return &out
}
DOMTokenListValueIteratorValueFromJS is allocating a new
DOMTokenListValueIteratorValue object and copy all values from
input javascript object
package domcore
import js "github.com/gowebapi/webapi/core/js"
import (
	"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 VisibilityState int
const (
	HiddenVisibilityState VisibilityState = iota
	VisibleVisibilityState
	PrerenderVisibilityState
)
var visibilityStateToWasmTable = []string{
	"hidden", "visible", "prerender",
}
var visibilityStateFromWasmTable = map[string]VisibilityState{
	"hidden": HiddenVisibilityState, "visible": VisibleVisibilityState, "prerender": PrerenderVisibilityState,
}
func (this *VisibilityState) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this VisibilityState) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(visibilityStateToWasmTable) {
		return visibilityStateToWasmTable[idx]
	}
	panic("unknown input value")
}
func VisibilityStateFromJS(value js.Value) VisibilityState {
	key := value.String()
	conv, ok := visibilityStateFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type DOMTokenListForEachFunc func(currentValue string, currentIndex int, listObj *DOMTokenList)
type DOMTokenListForEach js.Func
func DOMTokenListForEachToJS(callback DOMTokenListForEachFunc) *DOMTokenListForEach {
	if callback == nil {
		return nil
	}
	ret := DOMTokenListForEach(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 string         
			_p1 int            
			_p2 *DOMTokenList  
		)
		_p0 = (args[0]).String()
		_p1 = (args[1]).Int()
		_p2 = DOMTokenListFromJS(args[2])
		callback(_p0, _p1, _p2)
		return nil
	}))
	return &ret
}
func DOMTokenListForEachFromJS(_value js.Value) DOMTokenListForEachFunc {
	return func(currentValue string, currentIndex int, listObj *DOMTokenList) {
		var (
			_args [3]interface{}
			_end  int
		)
		_p0 := currentValue
		_args[0] = _p0
		_end++
		_p1 := currentIndex
		_args[1] = _p1
		_end++
		_p2 := listObj.JSValue()
		_args[2] = _p2
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type EventHandlerFunc func(event *Event) interface{}
type EventHandler js.Func
func EventHandlerToJS(callback EventHandlerFunc) *EventHandler {
	if callback == nil {
		return nil
	}
	ret := EventHandler(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 *Event  
		)
		_p0 = EventFromJS(args[0])
		_returned := callback(_p0)
		_converted := _returned
		return _converted
	}))
	return &ret
}
func EventHandlerFromJS(_value js.Value) EventHandlerFunc {
	return func(event *Event) (_result interface{}) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := event.JSValue()
		_args[0] = _p0
		_end++
		_returned := _value.Invoke(_args[0:_end]...)
		var (
			_converted js.Value  
		)
		_converted = _returned
		_result = _converted
		return
	}
}
type AddEventListenerOptions struct {
	Capture bool
	Passive bool
	Once    bool
}
func (_this *AddEventListenerOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Capture
	out.Set("capture", value0)
	value1 := _this.Passive
	out.Set("passive", value1)
	value2 := _this.Once
	out.Set("once", value2)
	return out
}
func AddEventListenerOptionsFromJS(value js.Wrapper) *AddEventListenerOptions {
	input := value.JSValue()
	var out AddEventListenerOptions
	var (
		value0 bool  
		value1 bool  
		value2 bool  
	)
	value0 = (input.Get("capture")).Bool()
	out.Capture = value0
	value1 = (input.Get("passive")).Bool()
	out.Passive = value1
	value2 = (input.Get("once")).Bool()
	out.Once = value2
	return &out
}
type CustomEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Detail     js.Value
}
func (_this *CustomEventInit) 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.Detail
	out.Set("detail", value3)
	return out
}
func CustomEventInitFromJS(value js.Wrapper) *CustomEventInit {
	input := value.JSValue()
	var out CustomEventInit
	var (
		value0 bool      
		value1 bool      
		value2 bool      
		value3 js.Value  
	)
	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 = input.Get("detail")
	out.Detail = value3
	return &out
}
type DOMTokenListEntryIteratorValue struct {
	Value []js.Value
	Done  bool
}
func (_this *DOMTokenListEntryIteratorValue) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := js.Global().Get("Array").New(len(_this.Value))
	for __idx0, __seq_in0 := range _this.Value {
		__seq_out0 := __seq_in0
		value0.SetIndex(__idx0, __seq_out0)
	}
	out.Set("value", value0)
	value1 := _this.Done
	out.Set("done", value1)
	return out
}
func DOMTokenListEntryIteratorValueFromJS(value js.Wrapper) *DOMTokenListEntryIteratorValue {
	input := value.JSValue()
	var out DOMTokenListEntryIteratorValue
	var (
		value0 []js.Value  
		value1 bool        
	)
	__length0 := input.Get("value").Length()
	__array0 := make([]js.Value, __length0, __length0)
	for __idx0 := 0; __idx0 < __length0; __idx0++ {
		var __seq_out0 js.Value
		__seq_in0 := input.Get("value").Index(__idx0)
		__seq_out0 = __seq_in0
		__array0[__idx0] = __seq_out0
	}
	value0 = __array0
	out.Value = value0
	value1 = (input.Get("done")).Bool()
	out.Done = value1
	return &out
}
type DOMTokenListKeyIteratorValue struct {
	Value uint
	Done  bool
}
func (_this *DOMTokenListKeyIteratorValue) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Value
	out.Set("value", value0)
	value1 := _this.Done
	out.Set("done", value1)
	return out
}
func DOMTokenListKeyIteratorValueFromJS(value js.Wrapper) *DOMTokenListKeyIteratorValue {
	input := value.JSValue()
	var out DOMTokenListKeyIteratorValue
	var (
		value0 uint  
		value1 bool  
	)
	value0 = (uint)((input.Get("value")).Int())
	out.Value = value0
	value1 = (input.Get("done")).Bool()
	out.Done = value1
	return &out
}
type DOMTokenListValueIteratorValue struct {
	Value string
	Done  bool
}
func (_this *DOMTokenListValueIteratorValue) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Value
	out.Set("value", value0)
	value1 := _this.Done
	out.Set("done", value1)
	return out
}