func (b *Blob) Bytes() ([]byte, error) {
	done := make(chan struct{})
	fr := js.Global.Get("FileReader").New()
	fr.Set("onloadend", func() { close(done) })
	fr.Call("readAsArrayBuffer", b)
	<-done // Wait for the read to finish
	if err := fr.Get("error"); err != nil {
		return nil, &js.Error{err}
	}
	return js.Global.Get("Uint8Array").New(fr.Get("result")).Interface().([]uint8), nil
}
// Bytes returns the contents of the Blob as a byte array, or returns an error
Bytes returns the contents of the Blob as a byte array, or returns an error
// Bytes returns the contents of the Blob as a byte array or returns an error
func (b *Blob) Bytes() ([]byte, error) {
	done := make(chan struct{})
	fr := js.Global.Get("FileReader").New()
	fr.Set("onloadend", func() { close(done) })
	fr.Call("readAsArrayBuffer", b)
	<-done 
	if err := fr.Get("error"); err != nil {
		return nil, &js.Error{err}
	}
	return js.Global.Get("Uint8Array").New(fr.Get("result")).Interface().([]uint8), nil
}
func ( b * Blob ) Bytes ( ) ( [ ] byte , error ) { done := make ( chan struct { } ) fr := js . Global . Get ( " " ) . New ( ) fr . Set ( " " , func ( ) { close ( done ) } ) fr . Call ( " " , b ) <- done if err := fr . Get ( " " ) ; err != nil { return nil , & js . Error { err } } return js . Global . Get ( " " ) . New ( fr . Get ( " " ) ) . Interface ( ) . ( [ ] uint8 ) , nil }
Bytes returns the contents of the Blob as a byte array, or returns an error
Bytes returns the contents of the Blob as a byte array or returns an error
// Wait for the read to finish