func (_this *DOMStringList) Length() uint {
	var ret uint
	value := _this.Value_JS.Get("length")
	ret = (uint)((value).Int())
	return ret
}
Length returning attribute 'length' with
type uint (idl: unsigned long).
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
}
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
}
type EventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
}
func (_this *EventInit) 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)
	return out
}
func EventInitFromJS(value js.Wrapper) *EventInit {
	input := value.JSValue()
	var out EventInit
	var (
		value0 bool  
		value1 bool  
		value2 bool  
	)
	value0 = (input.Get("bubbles")).Bool()
	out.Bubbles = value0
	value1 = (input.Get("cancelable")).Bool()
	out.Cancelable = value1
	value2 = (input.Get("composed")).Bool()
	out.Composed = value2
	return &out
}
type EventListenerOptions struct {
	Capture bool
}
func (_this *EventListenerOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Capture
	out.Set("capture", value0)
	return out
}
func EventListenerOptionsFromJS(value js.Wrapper) *EventListenerOptions {
	input := value.JSValue()
	var out EventListenerOptions
	var (
		value0 bool  
	)
	value0 = (input.Get("capture")).Bool()
	out.Capture = value0
	return &out
}
type ExtendableEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
}
func (_this *ExtendableEventInit) 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)
	return out
}
func ExtendableEventInitFromJS(value js.Wrapper) *ExtendableEventInit {
	input := value.JSValue()
	var out ExtendableEventInit
	var (
		value0 bool  
		value1 bool  
		value2 bool  
	)
	value0 = (input.Get("bubbles")).Bool()
	out.Bubbles = value0
	value1 = (input.Get("cancelable")).Bool()
	out.Cancelable = value1
	value2 = (input.Get("composed")).Bool()
	out.Composed = value2
	return &out
}
type AbortController struct {
	Value_JS js.Value
}
func (_this *AbortController) JSValue() js.Value {
	return _this.Value_JS
}
func AbortControllerFromJS(value js.Wrapper) *AbortController {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &AbortController{}
	ret.Value_JS = input
	return ret
}
func NewAbortController() (_result *AbortController) {
	_klass := js.Global().Get("AbortController")
	var (
		_args [0]interface{}
		_end  int
	)
	_returned := _klass.New(_args[0:_end]...)
	var (
		_converted *AbortController  
	)
	_converted = AbortControllerFromJS(_returned)
	_result = _converted
	return
}
func (_this *AbortController) Signal() *AbortSignal {
	var ret *AbortSignal
	value := _this.Value_JS.Get("signal")
	ret = AbortSignalFromJS(value)
	return ret
}
func (_this *AbortController) Abort() {
	var (
		_args [0]interface{}
		_end  int
	)
	_this.Value_JS.Call("abort", _args[0:_end]...)
	return
}
type AbortSignal struct {
	EventTarget
}
func AbortSignalFromJS(value js.Wrapper) *AbortSignal {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &AbortSignal{}
	ret.Value_JS = input
	return ret
}
func (_this *AbortSignal) Aborted() bool {
	var ret bool
	value := _this.Value_JS.Get("aborted")
	ret = (value).Bool()
	return ret
}
func (_this *AbortSignal) OnAbort() EventHandlerFunc {
	var ret EventHandlerFunc
	value := _this.Value_JS.Get("onabort")
	if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
		ret = EventHandlerFromJS(value)
	}
	return ret
}
func eventFuncAbortSignal_Event(listener func(event *Event, target *AbortSignal)) js.Func {
	fn := func(this js.Value, args []js.Value) interface{} {
		var ret *Event
		value := args[0]
		incoming := value.Get("target")
		ret = EventFromJS(value)
		src := AbortSignalFromJS(incoming)
		listener(ret, src)
		return js.Undefined()
	}
	return js.FuncOf(fn)
}
func (_this *AbortSignal) AddEventAbort(listener func(event *Event, currentTarget *AbortSignal)) js.Func {
	cb := eventFuncAbortSignal_Event(listener)
	_this.Value_JS.Call("addEventListener", "abort", cb)
	return cb
}
func (_this *AbortSignal) SetOnAbort(listener func(event *Event, currentTarget *AbortSignal)) js.Func {
	cb := eventFuncAbortSignal_Event(listener)
	_this.Value_JS.Set("onabort", cb)
	return cb
}
type CustomEvent struct {
	Event
}
func CustomEventFromJS(value js.Wrapper) *CustomEvent {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CustomEvent{}
	ret.Value_JS = input
	return ret
}
func NewCustomEvent(_type string, eventInitDict *CustomEventInit) (_result *CustomEvent) {
	_klass := js.Global().Get("CustomEvent")
	var (
		_args [2]interface{}
		_end  int
	)
	_p0 := _type
	_args[0] = _p0
	_end++
	if eventInitDict != nil {
		_p1 := eventInitDict.JSValue()
		_args[1] = _p1
		_end++
	}
	_returned := _klass.New(_args[0:_end]...)
	var (
		_converted *CustomEvent  
	)
	_converted = CustomEventFromJS(_returned)
	_result = _converted
	return
}
func (_this *CustomEvent) Detail() js.Value {
	var ret js.Value
	value := _this.Value_JS.Get("detail")
	ret = value
	return ret
}
func (_this *CustomEvent) InitCustomEvent(_type string, bubbles *bool, cancelable *bool, detail interface{}) {
	var (
		_args [4]interface{}
		_end  int
	)
	_p0 := _type
	_args[0] = _p0
	_end++
	if bubbles != nil {
		var _p1 interface{}
		if bubbles != nil {
			_p1 = *(bubbles)
		} else {
			_p1 = nil
		}
		_args[1] = _p1
		_end++
	}
	if cancelable != nil {
		var _p2 interface{}
		if cancelable != nil {
			_p2 = *(cancelable)
		} else {
			_p2 = nil
		}
		_args[2] = _p2
		_end++
	}
	if detail != nil {
		_p3 := detail
		_args[3] = _p3
		_end++
	}
	_this.Value_JS.Call("initCustomEvent", _args[0:_end]...)
	return
}
type DOMException struct {
	Value_JS js.Value
}
func (_this *DOMException) JSValue() js.Value {
	return _this.Value_JS
}
func DOMExceptionFromJS(value js.Wrapper) *DOMException {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &DOMException{}
	ret.Value_JS = input
	return ret
}
const (
	INDEX_SIZE_ERR              int = 1
	DOMSTRING_SIZE_ERR          int = 2
	HIERARCHY_REQUEST_ERR       int = 3
	WRONG_DOCUMENT_ERR          int = 4
	INVALID_CHARACTER_ERR       int = 5
	NO_DATA_ALLOWED_ERR         int = 6
	NO_MODIFICATION_ALLOWED_ERR int = 7
	NOT_FOUND_ERR               int = 8
	NOT_SUPPORTED_ERR           int = 9
	INUSE_ATTRIBUTE_ERR         int = 10
	INVALID_STATE_ERR           int = 11
	SYNTAX_ERR                  int = 12
	INVALID_MODIFICATION_ERR    int = 13
	NAMESPACE_ERR               int = 14
	INVALID_ACCESS_ERR          int = 15
	VALIDATION_ERR              int = 16
	TYPE_MISMATCH_ERR           int = 17
	SECURITY_ERR                int = 18
	NETWORK_ERR                 int = 19
	ABORT_ERR                   int = 20
	URL_MISMATCH_ERR            int = 21
	QUOTA_EXCEEDED_ERR          int = 22
	TIMEOUT_ERR                 int = 23
	INVALID_NODE_TYPE_ERR       int = 24
	DATA_CLONE_ERR              int = 25
)
func NewDOMException(message *string, name *string) (_result *DOMException) {
	_klass := js.Global().Get("DOMException")
	var (
		_args [2]interface{}
		_end  int
	)
	if message != nil {
		var _p0 interface{}
		if message != nil {
			_p0 = *(message)
		} else {
			_p0 = nil
		}
		_args[0] = _p0
		_end++
	}
	if name != nil {
		var _p1 interface{}
		if name != nil {
			_p1 = *(name)
		} else {
			_p1 = nil
		}
		_args[1] = _p1
		_end++
	}
	_returned := _klass.New(_args[0:_end]...)
	var (
		_converted *DOMException  
	)
	_converted = DOMExceptionFromJS(_returned)
	_result = _converted
	return
}
func (_this *DOMException) Name() string {
	var ret string
	value := _this.Value_JS.Get("name")
	ret = (value).String()
	return ret
}
func (_this *DOMException) Message() string {
	var ret string
	value := _this.Value_JS.Get("message")
	ret = (value).String()
	return ret
}
func (_this *DOMException) Code() int {
	var ret int
	value := _this.Value_JS.Get("code")
	ret = (value).Int()
	return ret
}
type DOMStringList struct {
	Value_JS js.Value
}
func (_this *DOMStringList) JSValue() js.Value {
	return _this.Value_JS
}
func DOMStringListFromJS(value js.Wrapper) *DOMStringList {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &DOMStringList{}
	ret.Value_JS = input
	return ret
}