func Register(inter js.Value, contruct func(js.Value) (interface{}, error)) error {
	var obj js.Value
	var err error
	if registry == nil {
		registry = make(map[string]func(js.Value) (interface{}, error))
	}
	if obj, err = Get(inter, "name"); err == nil {
		if !obj.IsUndefined() {
			registry[obj.String()] = contruct
		}
	}
	return err
}
Register Register a construct func for type Object given
package baseobject
import (
	"errors"
	"syscall/js"
)
var setFunc js.Value
var getFunc js.Value
var callFunc js.Value
var invokeFunc js.Value
var errorInterface js.Value
func SetSyscall() {
	eval_(`hSet = (obj, set , value) => { try { Reflect.set(obj,set,value) ; return }catch(err){ return err } }`)
	eval_(`hGet = (obj, get ) => { try { return [true,Reflect.get(obj,get)] }catch(err){ return [false,err] } }`)
	eval_(`hCall = (obj,method,args) => { try { func=Reflect.get(obj,method); return [true,Reflect.apply(func,obj,args)] } catch (err) { return [false,err] } }`)
	eval_(`hInvoke = (func,args) => { try { return [true,Reflect.apply(func,undefined,args)] } catch (err) { return [false,err] } }`)
	setFunc = js.Global().Get("hSet")
	getFunc = js.Global().Get("hGet")
	callFunc = js.Global().Get("hCall")
	invokeFunc = js.Global().Get("hInvoke")
	errorInterface = js.Global().Get("Error")
}
func Set(obj js.Value, name string, val interface{}) error {
	var err error
	ret := setFunc.Invoke(obj, js.ValueOf(name), val)
	if !ret.IsUndefined() {
		err = errors.New(ret.Get("message").String())
	}
	return err
}
func Get(obj js.Value, name string) (js.Value, error) {
	ret := getFunc.Invoke(obj, js.ValueOf(name))
	if ret.Index(0).Bool() {
		return ret.Index(1), nil
	} else {
		return ret.Index(1), errors.New(ret.Index(1).Get("message").String())
	}
}
func Call(obj js.Value, name string, args ...interface{}) (js.Value, error) {
	var jsargs []interface{}
	for _, arg := range args {
		jsargs = append(jsargs, js.ValueOf(arg))
	}
	ret := callFunc.Invoke(obj, js.ValueOf(name), jsargs)
	if ret.Index(0).Bool() {
		return ret.Index(1), nil
	} else {
		return ret.Index(1), errors.New(ret.Index(1).Get("message").String())
	}
}
func Invoke(f js.Value, args ...interface{}) (js.Value, error) {
	var jsargs []interface{}
	for _, arg := range args {
		jsargs = append(jsargs, js.ValueOf(arg))
	}
	ret := invokeFunc.Invoke(f, jsargs)
	if ret.Index(0).Bool() {
		return ret.Index(1), nil
	} else {
		return ret.Index(1), errors.New(ret.Index(1).Get("message").String())
	}
}
func CopyBytesToGo(dst []byte, src js.Value) (int, error) {
	return js.CopyBytesToGo(dst, src), nil
}
func CopyBytesToJS(dst js.Value, src []byte) (int, error) {
	return js.CopyBytesToJS(dst, src), nil
}
var registry map[string]func(js.Value) (interface{}, error)