Web API package for use when compling Go to WASM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

32 lines
732 B

// Code generated DO NOT EDIT
// blob.go
package dom
import "syscall/js"
type BlobIFace interface {
GetSize() int
Slice(args ...interface{}) Blob
GetType() string
}
type Blob struct {
Value
}
func JSValueToBlob(val js.Value) Blob { return Blob{Value: JSValueToValue(val)} }
func (v Value) AsBlob() Blob { return Blob{Value: v} }
func NewBlob(args ...interface{}) Blob {
return Blob{Value: JSValueToValue(js.Global().Get("Blob").New(args...))}
}
func (b Blob) GetSize() int {
val := b.Get("size")
return val.Int()
}
func (b Blob) Slice(args ...interface{}) Blob {
val := b.Call("slice", args...)
return JSValueToBlob(val.JSValue())
}
func (b Blob) GetType() string {
val := b.Get("type")
return val.String()
}