func (m *Memory) CopyFrom(v Wrapper) error {
	var src Value
	switch v := v.(type) {
	case Value:
		src = v
	case TypedArray:
		src = v.Value
	default:
		src = Value{v.JSValue()}
	}
	switch {
	case src.InstanceOfClass("Uint8Array"):
		m.v.Call("set", src)
		return nil
	case src.InstanceOfClass("Blob"):
		r := New("FileReader")
		cg := r.NewFuncGroup()
		defer cg.Release()
		done := cg.OneTimeTrigger("loadend")
		errc := cg.ErrorEventChan()
		r.Call("readAsArrayBuffer", src)
		select {
		case err := <-errc:
			return err
		case <-done:
		}
		cg.Release()
		arr := New("Uint8Array", r.Get("result"))
		return m.CopyFrom(arr)
	default:
		return fmt.Errorf("unsupported source type")
	}
}
CopyFrom copies binary data from JS object into Go buffer.
package js
import (
	"fmt"
)
var _ Wrapper = TypedArray{}
type TypedArray struct {
	Value
}
func (v TypedArray) Release() {
	releaseTypedArray(v.Ref)
}
func TypedArrayOf(o interface{}) TypedArray {
	v := typedArrayOf(toJS(o))
	return TypedArray{Value{v}}
}
var _ Wrapper = (*Memory)(nil)
type Memory struct {
	v TypedArray
	p []byte
}
func (m *Memory) Bytes() []byte {
	return m.p
}