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
}
AddEventListenerOptionsFromJS is allocating a new
AddEventListenerOptions 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
}