func New(name string) *js.Object { core.ExternalGenerator = idGenerator{} a := &App{ registrations: make(map[uint64]*js.Object), subscriptions: make(map[uint64]*js.Object), } d := Domain{ coreDomain: core.NewDomain(name, nil), app: a, } d.wrapped = js.MakeWrapper(&d) return d.wrapped }
//export NewDomain func NewDomain(name *C.char) unsafe.Pointer { d := core.NewDomain(C.GoString(name), nil) return unsafe.Pointer(&d) }
func NewDomain(name string) Domain { return Domain{coreDomain: core.NewDomain(name, nil)} }