package promises import "syscall/js" func NewGlobal(thing string, args ...any) js.Value { newThing := js.Global().Get(thing) return newThing.New(args...) }