asticode / go-astilectron-bootstrap

Create a one-window application using Astilectron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Catch window event with bootstrap

ThePutzy opened this issue · comments

Hi,
is it possible to set the window events with the bootstrap?
i tried it in the "OnWait" but it's not fired:

...
OnWait: func(a *astilectron.Astilectron, ws []*astilectron.Window, menu *astilectron.Menu, tray *astilectron.Tray, tm *astilectron.Menu) error {
  ws[0].On(astilectron.EventNameWindowEventDidFinishLoad, func(e astilectron.Event) (deleteListener bool) {
				fmt.Println("------")
				a.Log.Println("Load finished Start external connections")
				fmt.Println("------")
				return
			})
...