func main() {
	dom := ui.NewDOM(global)
	defer dom.AlertOnPanic()
	f := flags{
		dom:         dom,
		httpTimeout: 10 * time.Second,
		tileLength:  25, // also in game.html
	}
	ctx := context.Background()
	ctx, cancelFunc := context.WithCancel(ctx)
	var wg sync.WaitGroup
	f.initDom(ctx, &wg)
	enableInteraction(dom)
	initBeforeUnloadFn(cancelFunc, &wg, global)
	wg.Wait() // BLOCKING
}
// main initializes the wasm code for the web dom and runs as long as the browser is open.
main initializes the wasm code for the web dom and runs as long as the browser is open.
// main initializes the wasm code for the web dom and runs as long as the browser is open .
func main() {
	dom := ui.NewDOM(global)
	defer dom.AlertOnPanic()
	f := flags{
		dom:         dom,
		httpTimeout: 10 * time.Second,
		tileLength:  25, 
	}
	ctx := context.Background()
	ctx, cancelFunc := context.WithCancel(ctx)
	var wg sync.WaitGroup
	f.initDom(ctx, &wg)
	enableInteraction(dom)
	initBeforeUnloadFn(cancelFunc, &wg, global)
	wg.Wait() 
}
func main ( ) { dom := ui . NewDOM ( global ) defer dom . AlertOnPanic ( ) f := flags { dom : dom , httpTimeout : 10 * time . Second , tileLength : 25 , } ctx := context . Background ( ) ctx , cancelFunc := context . WithCancel ( ctx ) var wg sync . WaitGroup f . initDom ( ctx , & wg ) enableInteraction ( dom ) initBeforeUnloadFn ( cancelFunc , & wg , global ) wg . Wait ( ) }
main initializes the wasm code for the web dom and runs as long as the browser is open.
main initializes the wasm code for the web dom and runs as long as the browser is open .
// also in game.html // BLOCKING