func (_this *CookieChangeEvent) Changed() []*CookieListItem {
	var ret []*CookieListItem
	value := _this.Value_JS.Get("changed")
	__length0 := value.Length()
	__array0 := make([]*CookieListItem, __length0, __length0)
	for __idx0 := 0; __idx0 < __length0; __idx0++ {
		var __seq_out0 *CookieListItem
		__seq_in0 := value.Index(__idx0)
		__seq_out0 = CookieListItemFromJS(__seq_in0)
		__array0[__idx0] = __seq_out0
	}
	ret = __array0
	return ret
}
Changed returning attribute 'changed' with
type []CookieListItem (idl: sequence<CookieListItem>).
package cookie
import "syscall/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 CookieMatchType int
const (
	EqualsCookieMatchType CookieMatchType = iota
	StartsWithCookieMatchType
)
var cookieMatchTypeToWasmTable = []string{
	"equals", "starts-with",
}
var cookieMatchTypeFromWasmTable = map[string]CookieMatchType{
	"equals": EqualsCookieMatchType, "starts-with": StartsWithCookieMatchType,
}
func (this *CookieMatchType) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this CookieMatchType) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(cookieMatchTypeToWasmTable) {
		return cookieMatchTypeToWasmTable[idx]
	}
	panic("unknown input value")
}
func CookieMatchTypeFromJS(value js.Value) CookieMatchType {
	key := value.String()
	conv, ok := cookieMatchTypeFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type CookieSameSite int
const (
	StrictCookieSameSite CookieSameSite = iota
	LaxCookieSameSite
	UnrestrictedCookieSameSite
)
var cookieSameSiteToWasmTable = []string{
	"strict", "lax", "unrestricted",
}
var cookieSameSiteFromWasmTable = map[string]CookieSameSite{
	"strict": StrictCookieSameSite, "lax": LaxCookieSameSite, "unrestricted": UnrestrictedCookieSameSite,
}
func (this *CookieSameSite) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this CookieSameSite) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(cookieSameSiteToWasmTable) {
		return cookieSameSiteToWasmTable[idx]
	}
	panic("unknown input value")
}
func CookieSameSiteFromJS(value js.Value) CookieSameSite {
	key := value.String()
	conv, ok := cookieSameSiteFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type PromiseNilCookieListItemOnFulfilledFunc func(value *CookieListItem)
type PromiseNilCookieListItemOnFulfilled js.Func
func PromiseNilCookieListItemOnFulfilledToJS(callback PromiseNilCookieListItemOnFulfilledFunc) *PromiseNilCookieListItemOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseNilCookieListItemOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 *CookieListItem  
		)
		_p0 = CookieListItemFromJS(args[0])
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseNilCookieListItemOnFulfilledFromJS(_value js.Value) PromiseNilCookieListItemOnFulfilledFunc {
	return func(value *CookieListItem) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := value.JSValue()
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseNilCookieListItemOnRejectedFunc func(reason js.Value)
type PromiseNilCookieListItemOnRejected js.Func
func PromiseNilCookieListItemOnRejectedToJS(callback PromiseNilCookieListItemOnRejectedFunc) *PromiseNilCookieListItemOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseNilCookieListItemOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseNilCookieListItemOnRejectedFromJS(_value js.Value) PromiseNilCookieListItemOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceCookieListItemOnFulfilledFunc func(value []*CookieListItem)
type PromiseSequenceCookieListItemOnFulfilled js.Func
func PromiseSequenceCookieListItemOnFulfilledToJS(callback PromiseSequenceCookieListItemOnFulfilledFunc) *PromiseSequenceCookieListItemOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceCookieListItemOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 []*CookieListItem  
		)
		__length0 := args[0].Length()
		__array0 := make([]*CookieListItem, __length0, __length0)
		for __idx0 := 0; __idx0 < __length0; __idx0++ {
			var __seq_out0 *CookieListItem
			__seq_in0 := args[0].Index(__idx0)
			__seq_out0 = CookieListItemFromJS(__seq_in0)
			__array0[__idx0] = __seq_out0
		}
		_p0 = __array0
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceCookieListItemOnFulfilledFromJS(_value js.Value) PromiseSequenceCookieListItemOnFulfilledFunc {
	return func(value []*CookieListItem) {
		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 PromiseSequenceCookieListItemOnRejectedFunc func(reason js.Value)
type PromiseSequenceCookieListItemOnRejected js.Func
func PromiseSequenceCookieListItemOnRejectedToJS(callback PromiseSequenceCookieListItemOnRejectedFunc) *PromiseSequenceCookieListItemOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceCookieListItemOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceCookieListItemOnRejectedFromJS(_value js.Value) PromiseSequenceCookieListItemOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceCookieStoreGetOptionsOnFulfilledFunc func(value []*CookieStoreGetOptions)
type PromiseSequenceCookieStoreGetOptionsOnFulfilled js.Func
func PromiseSequenceCookieStoreGetOptionsOnFulfilledToJS(callback PromiseSequenceCookieStoreGetOptionsOnFulfilledFunc) *PromiseSequenceCookieStoreGetOptionsOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceCookieStoreGetOptionsOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 []*CookieStoreGetOptions  
		)
		__length0 := args[0].Length()
		__array0 := make([]*CookieStoreGetOptions, __length0, __length0)
		for __idx0 := 0; __idx0 < __length0; __idx0++ {
			var __seq_out0 *CookieStoreGetOptions
			__seq_in0 := args[0].Index(__idx0)
			__seq_out0 = CookieStoreGetOptionsFromJS(__seq_in0)
			__array0[__idx0] = __seq_out0
		}
		_p0 = __array0
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceCookieStoreGetOptionsOnFulfilledFromJS(_value js.Value) PromiseSequenceCookieStoreGetOptionsOnFulfilledFunc {
	return func(value []*CookieStoreGetOptions) {
		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 PromiseSequenceCookieStoreGetOptionsOnRejectedFunc func(reason js.Value)
type PromiseSequenceCookieStoreGetOptionsOnRejected js.Func
func PromiseSequenceCookieStoreGetOptionsOnRejectedToJS(callback PromiseSequenceCookieStoreGetOptionsOnRejectedFunc) *PromiseSequenceCookieStoreGetOptionsOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceCookieStoreGetOptionsOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceCookieStoreGetOptionsOnRejectedFromJS(_value js.Value) PromiseSequenceCookieStoreGetOptionsOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type CookieChangeEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Changed    []*CookieListItem
	Deleted    []*CookieListItem
}
func (_this *CookieChangeEventInit) 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 := js.Global().Get("Array").New(len(_this.Changed))
	for __idx3, __seq_in3 := range _this.Changed {
		__seq_out3 := __seq_in3.JSValue()
		value3.SetIndex(__idx3, __seq_out3)
	}
	out.Set("changed", value3)
	value4 := js.Global().Get("Array").New(len(_this.Deleted))
	for __idx4, __seq_in4 := range _this.Deleted {
		__seq_out4 := __seq_in4.JSValue()
		value4.SetIndex(__idx4, __seq_out4)
	}
	out.Set("deleted", value4)
	return out
}
func CookieChangeEventInitFromJS(value js.Wrapper) *CookieChangeEventInit {
	input := value.JSValue()
	var out CookieChangeEventInit
	var (
		value0 bool               
		value1 bool               
		value2 bool               
		value3 []*CookieListItem  
		value4 []*CookieListItem  
	)
	value0 = (input.Get("bubbles")).Bool()
	out.Bubbles = value0
	value1 = (input.Get("cancelable")).Bool()
	out.Cancelable = value1
	value2 = (input.Get("composed")).Bool()
	out.Composed = value2
	__length3 := input.Get("changed").Length()
	__array3 := make([]*CookieListItem, __length3, __length3)
	for __idx3 := 0; __idx3 < __length3; __idx3++ {
		var __seq_out3 *CookieListItem
		__seq_in3 := input.Get("changed").Index(__idx3)
		__seq_out3 = CookieListItemFromJS(__seq_in3)
		__array3[__idx3] = __seq_out3
	}
	value3 = __array3
	out.Changed = value3
	__length4 := input.Get("deleted").Length()
	__array4 := make([]*CookieListItem, __length4, __length4)
	for __idx4 := 0; __idx4 < __length4; __idx4++ {
		var __seq_out4 *CookieListItem
		__seq_in4 := input.Get("deleted").Index(__idx4)
		__seq_out4 = CookieListItemFromJS(__seq_in4)
		__array4[__idx4] = __seq_out4
	}
	value4 = __array4
	out.Deleted = value4
	return &out
}
type CookieListItem struct {
	Name     string
	Value    string
	Domain   *string
	Path     string
	Expires  *int
	Secure   bool
	SameSite CookieSameSite
}
func (_this *CookieListItem) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Name
	out.Set("name", value0)
	value1 := _this.Value
	out.Set("value", value1)
	var value2 interface{}
	if _this.Domain != nil {
		value2 = *(_this.Domain)
	} else {
		value2 = nil
	}
	out.Set("domain", value2)
	value3 := _this.Path
	out.Set("path", value3)
	var value4 interface{}
	if _this.Expires != nil {
		value4 = *(_this.Expires)
	} else {
		value4 = nil
	}
	out.Set("expires", value4)
	value5 := _this.Secure
	out.Set("secure", value5)
	value6 := _this.SameSite.JSValue()
	out.Set("sameSite", value6)
	return out
}
func CookieListItemFromJS(value js.Wrapper) *CookieListItem {
	input := value.JSValue()
	var out CookieListItem
	var (
		value0 string          
		value1 string          
		value2 *string         
		value3 string          
		value4 *int            
		value5 bool            
		value6 CookieSameSite  
	)
	value0 = (input.Get("name")).String()
	out.Name = value0
	value1 = (input.Get("value")).String()
	out.Value = value1
	if input.Get("domain").Type() != js.TypeNull && input.Get("domain").Type() != js.TypeUndefined {
		__tmp := (input.Get("domain")).String()
		value2 = &__tmp
	}
	out.Domain = value2
	value3 = (input.Get("path")).String()
	out.Path = value3
	if input.Get("expires").Type() != js.TypeNull && input.Get("expires").Type() != js.TypeUndefined {
		__tmp := (input.Get("expires")).Int()
		value4 = &__tmp
	}
	out.Expires = value4
	value5 = (input.Get("secure")).Bool()
	out.Secure = value5
	value6 = CookieSameSiteFromJS(input.Get("sameSite"))
	out.SameSite = value6
	return &out
}
type CookieStoreDeleteOptions struct {
	Name   string
	Domain *string
	Path   string
}
func (_this *CookieStoreDeleteOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Name
	out.Set("name", value0)
	var value1 interface{}
	if _this.Domain != nil {
		value1 = *(_this.Domain)
	} else {
		value1 = nil
	}
	out.Set("domain", value1)
	value2 := _this.Path
	out.Set("path", value2)
	return out
}
func CookieStoreDeleteOptionsFromJS(value js.Wrapper) *CookieStoreDeleteOptions {
	input := value.JSValue()
	var out CookieStoreDeleteOptions
	var (
		value0 string   
		value1 *string  
		value2 string   
	)
	value0 = (input.Get("name")).String()
	out.Name = value0
	if input.Get("domain").Type() != js.TypeNull && input.Get("domain").Type() != js.TypeUndefined {
		__tmp := (input.Get("domain")).String()
		value1 = &__tmp
	}
	out.Domain = value1
	value2 = (input.Get("path")).String()
	out.Path = value2
	return &out
}
type CookieStoreGetOptions struct {
	Name      string
	Url       string
	MatchType CookieMatchType
}
func (_this *CookieStoreGetOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Name
	out.Set("name", value0)
	value1 := _this.Url
	out.Set("url", value1)
	value2 := _this.MatchType.JSValue()
	out.Set("matchType", value2)
	return out
}
func CookieStoreGetOptionsFromJS(value js.Wrapper) *CookieStoreGetOptions {
	input := value.JSValue()
	var out CookieStoreGetOptions
	var (
		value0 string           
		value1 string           
		value2 CookieMatchType  
	)
	value0 = (input.Get("name")).String()
	out.Name = value0
	value1 = (input.Get("url")).String()
	out.Url = value1
	value2 = CookieMatchTypeFromJS(input.Get("matchType"))
	out.MatchType = value2
	return &out
}
type CookieStoreSetExtraOptions struct {
	Expires  *int
	Domain   *string
	Path     string
	Secure   bool
	SameSite CookieSameSite
	Name     string
	Value    string
}
func (_this *CookieStoreSetExtraOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	var value0 interface{}
	if _this.Expires != nil {
		value0 = *(_this.Expires)
	} else {
		value0 = nil
	}
	out.Set("expires", value0)
	var value1 interface{}
	if _this.Domain != nil {
		value1 = *(_this.Domain)
	} else {
		value1 = nil
	}
	out.Set("domain", value1)
	value2 := _this.Path
	out.Set("path", value2)
	value3 := _this.Secure
	out.Set("secure", value3)
	value4 := _this.SameSite.JSValue()
	out.Set("sameSite", value4)
	value5 := _this.Name
	out.Set("name", value5)
	value6 := _this.Value
	out.Set("value", value6)
	return out
}
func CookieStoreSetExtraOptionsFromJS(value js.Wrapper) *CookieStoreSetExtraOptions {
	input := value.JSValue()
	var out CookieStoreSetExtraOptions
	var (
		value0 *int            
		value1 *string         
		value2 string          
		value3 bool            
		value4 CookieSameSite  
		value5 string          
		value6 string          
	)
	if input.Get("expires").Type() != js.TypeNull && input.Get("expires").Type() != js.TypeUndefined {
		__tmp := (input.Get("expires")).Int()
		value0 = &__tmp
	}
	out.Expires = value0
	if input.Get("domain").Type() != js.TypeNull && input.Get("domain").Type() != js.TypeUndefined {
		__tmp := (input.Get("domain")).String()
		value1 = &__tmp
	}
	out.Domain = value1
	value2 = (input.Get("path")).String()
	out.Path = value2
	value3 = (input.Get("secure")).Bool()
	out.Secure = value3
	value4 = CookieSameSiteFromJS(input.Get("sameSite"))
	out.SameSite = value4
	value5 = (input.Get("name")).String()
	out.Name = value5
	value6 = (input.Get("value")).String()
	out.Value = value6
	return &out
}
type CookieStoreSetOptions struct {
	Expires  *int
	Domain   *string
	Path     string
	Secure   bool
	SameSite CookieSameSite
}
func (_this *CookieStoreSetOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	var value0 interface{}
	if _this.Expires != nil {
		value0 = *(_this.Expires)
	} else {
		value0 = nil
	}
	out.Set("expires", value0)
	var value1 interface{}
	if _this.Domain != nil {
		value1 = *(_this.Domain)
	} else {
		value1 = nil
	}
	out.Set("domain", value1)
	value2 := _this.Path
	out.Set("path", value2)
	value3 := _this.Secure
	out.Set("secure", value3)
	value4 := _this.SameSite.JSValue()
	out.Set("sameSite", value4)
	return out
}
func CookieStoreSetOptionsFromJS(value js.Wrapper) *CookieStoreSetOptions {
	input := value.JSValue()
	var out CookieStoreSetOptions
	var (
		value0 *int            
		value1 *string         
		value2 string          
		value3 bool            
		value4 CookieSameSite  
	)
	if input.Get("expires").Type() != js.TypeNull && input.Get("expires").Type() != js.TypeUndefined {
		__tmp := (input.Get("expires")).Int()
		value0 = &__tmp
	}
	out.Expires = value0
	if input.Get("domain").Type() != js.TypeNull && input.Get("domain").Type() != js.TypeUndefined {
		__tmp := (input.Get("domain")).String()
		value1 = &__tmp
	}
	out.Domain = value1
	value2 = (input.Get("path")).String()
	out.Path = value2
	value3 = (input.Get("secure")).Bool()
	out.Secure = value3
	value4 = CookieSameSiteFromJS(input.Get("sameSite"))
	out.SameSite = value4
	return &out
}
type ExtendableCookieChangeEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Changed    []*CookieListItem
	Deleted    []*CookieListItem
}
func (_this *ExtendableCookieChangeEventInit) 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 := js.Global().Get("Array").New(len(_this.Changed))
	for __idx3, __seq_in3 := range _this.Changed {
		__seq_out3 := __seq_in3.JSValue()
		value3.SetIndex(__idx3, __seq_out3)
	}
	out.Set("changed", value3)
	value4 := js.Global().Get("Array").New(len(_this.Deleted))
	for __idx4, __seq_in4 := range _this.Deleted {
		__seq_out4 := __seq_in4.JSValue()
		value4.SetIndex(__idx4, __seq_out4)
	}
	out.Set("deleted", value4)
	return out
}
func ExtendableCookieChangeEventInitFromJS(value js.Wrapper) *ExtendableCookieChangeEventInit {
	input := value.JSValue()
	var out ExtendableCookieChangeEventInit
	var (
		value0 bool               
		value1 bool               
		value2 bool               
		value3 []*CookieListItem  
		value4 []*CookieListItem  
	)
	value0 = (input.Get("bubbles")).Bool()
	out.Bubbles = value0
	value1 = (input.Get("cancelable")).Bool()
	out.Cancelable = value1
	value2 = (input.Get("composed")).Bool()
	out.Composed = value2
	__length3 := input.Get("changed").Length()
	__array3 := make([]*CookieListItem, __length3, __length3)
	for __idx3 := 0; __idx3 < __length3; __idx3++ {
		var __seq_out3 *CookieListItem
		__seq_in3 := input.Get("changed").Index(__idx3)
		__seq_out3 = CookieListItemFromJS(__seq_in3)
		__array3[__idx3] = __seq_out3
	}
	value3 = __array3
	out.Changed = value3
	__length4 := input.Get("deleted").Length()
	__array4 := make([]*CookieListItem, __length4, __length4)
	for __idx4 := 0; __idx4 < __length4; __idx4++ {
		var __seq_out4 *CookieListItem
		__seq_in4 := input.Get("deleted").Index(__idx4)
		__seq_out4 = CookieListItemFromJS(__seq_in4)
		__array4[__idx4] = __seq_out4
	}
	value4 = __array4
	out.Deleted = value4
	return &out
}
type CookieChangeEvent struct {
	domcore.Event
}
func CookieChangeEventFromJS(value js.Wrapper) *CookieChangeEvent {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &CookieChangeEvent{}
	ret.Value_JS = input
	return ret
}
func NewCookieChangeEvent(_type string, eventInitDict *CookieChangeEventInit) (_result *CookieChangeEvent) {
	_klass := js.Global().Get("CookieChangeEvent")
	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 *CookieChangeEvent  
	)
	_converted = CookieChangeEventFromJS(_returned)
	_result = _converted
	return
}