func ProgressEventInitFromJS(value js.Wrapper) *ProgressEventInit {
	input := value.JSValue()
	var out ProgressEventInit
	var (
		value0 bool  
		value1 bool  
		value2 bool  
		value3 bool  
		value4 int   
		value5 int   
	)
	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("lengthComputable")).Bool()
	out.LengthComputable = value3
	value4 = (input.Get("loaded")).Int()
	out.Loaded = value4
	value5 = (input.Get("total")).Int()
	out.Total = value5
	return &out
}
ProgressEventInitFromJS is allocating a new
ProgressEventInit object and copy all values from
input javascript object
package xhr
import "syscall/js"
import (
	"github.com/gowebapi/webapi/dom/domcore"
	"github.com/gowebapi/webapi/patch"
)
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 XMLHttpRequestResponseType int
const (
	EmptyString0XMLHttpRequestResponseType XMLHttpRequestResponseType = iota
	ArraybufferXMLHttpRequestResponseType
	BlobXMLHttpRequestResponseType
	DocumentXMLHttpRequestResponseType
	JsonXMLHttpRequestResponseType
	TextXMLHttpRequestResponseType
)
var xMLHttpRequestResponseTypeToWasmTable = []string{
	"", "arraybuffer", "blob", "document", "json", "text",
}
var xMLHttpRequestResponseTypeFromWasmTable = map[string]XMLHttpRequestResponseType{
	"": EmptyString0XMLHttpRequestResponseType, "arraybuffer": ArraybufferXMLHttpRequestResponseType, "blob": BlobXMLHttpRequestResponseType, "document": DocumentXMLHttpRequestResponseType, "json": JsonXMLHttpRequestResponseType, "text": TextXMLHttpRequestResponseType,
}
func (this *XMLHttpRequestResponseType) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this XMLHttpRequestResponseType) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(xMLHttpRequestResponseTypeToWasmTable) {
		return xMLHttpRequestResponseTypeToWasmTable[idx]
	}
	panic("unknown input value")
}
func XMLHttpRequestResponseTypeFromJS(value js.Value) XMLHttpRequestResponseType {
	key := value.String()
	conv, ok := xMLHttpRequestResponseTypeFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type ProgressEventInit struct {
	Bubbles          bool
	Cancelable       bool
	Composed         bool
	LengthComputable bool
	Loaded           int
	Total            int
}
func (_this *ProgressEventInit) 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.LengthComputable
	out.Set("lengthComputable", value3)
	value4 := _this.Loaded
	out.Set("loaded", value4)
	value5 := _this.Total
	out.Set("total", value5)
	return out
}