func (_this *XMLHttpRequest) Upload() *XMLHttpRequestUpload {
	var ret *XMLHttpRequestUpload
	value := _this.Value_JS.Get("upload")
	ret = XMLHttpRequestUploadFromJS(value)
	return ret
}
Upload returning attribute 'upload' with
type XMLHttpRequestUpload (idl: XMLHttpRequestUpload).
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
}
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
}
type ProgressEvent struct {
	domcore.Event
}
func ProgressEventFromJS(value js.Wrapper) *ProgressEvent {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &ProgressEvent{}
	ret.Value_JS = input
	return ret
}
func NewProgressEvent(_type string, eventInitDict *ProgressEventInit) (_result *ProgressEvent) {
	_klass := js.Global().Get("ProgressEvent")
	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 *ProgressEvent  
	)
	_converted = ProgressEventFromJS(_returned)
	_result = _converted
	return
}
func (_this *ProgressEvent) LengthComputable() bool {
	var ret bool
	value := _this.Value_JS.Get("lengthComputable")
	ret = (value).Bool()
	return ret
}
func (_this *ProgressEvent) Loaded() int {
	var ret int
	value := _this.Value_JS.Get("loaded")
	ret = (value).Int()
	return ret
}
func (_this *ProgressEvent) Total() int {
	var ret int
	value := _this.Value_JS.Get("total")
	ret = (value).Int()
	return ret
}
type XMLHttpRequest struct {
	XMLHttpRequestEventTarget
}
func XMLHttpRequestFromJS(value js.Wrapper) *XMLHttpRequest {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &XMLHttpRequest{}
	ret.Value_JS = input
	return ret
}
const (
	UNSENT           int = 0
	OPENED           int = 1
	HEADERS_RECEIVED int = 2
	LOADING          int = 3
	DONE             int = 4
)
func NewXMLHttpRequest() (_result *XMLHttpRequest) {
	_klass := js.Global().Get("XMLHttpRequest")
	var (
		_args [0]interface{}
		_end  int
	)
	_returned := _klass.New(_args[0:_end]...)
	var (
		_converted *XMLHttpRequest  
	)
	_converted = XMLHttpRequestFromJS(_returned)
	_result = _converted
	return
}
func (_this *XMLHttpRequest) OnReadyStateChange() domcore.EventHandlerFunc {
	var ret domcore.EventHandlerFunc
	value := _this.Value_JS.Get("onreadystatechange")
	if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
		ret = domcore.EventHandlerFromJS(value)
	}
	return ret
}
func (_this *XMLHttpRequest) ReadyState() int {
	var ret int
	value := _this.Value_JS.Get("readyState")
	ret = (value).Int()
	return ret
}
func (_this *XMLHttpRequest) Timeout() uint {
	var ret uint
	value := _this.Value_JS.Get("timeout")
	ret = (uint)((value).Int())
	return ret
}
func (_this *XMLHttpRequest) SetTimeout(value uint) {
	input := value
	_this.Value_JS.Set("timeout", input)
}
func (_this *XMLHttpRequest) WithCredentials() bool {
	var ret bool
	value := _this.Value_JS.Get("withCredentials")
	ret = (value).Bool()
	return ret
}
func (_this *XMLHttpRequest) SetWithCredentials(value bool) {
	input := value
	_this.Value_JS.Set("withCredentials", input)
}