Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

feat:add listener module #22

Closed
wants to merge 1 commit into from
Closed

Conversation

baerwang
Copy link

No description provided.

@asticode
Copy link
Owner

I've the feeling that adding this option is kind of overkill since your test could be changed to this with what is already available:

err := Run(Options{
	Adapter: func(a *astilectron.Astilectron) {
		for n, l := range map[string]Listener{
			astilectron.EventNameAppCmdQuit: func(e astilectron.Event) (deleteListener bool) {
				t.Log("-----", time.Now(), "-----")
				return
			}
		} {
			a.On(n, l)
		}
	},
	AstilectronOptions: astilectron.Options{},
	Debug:              false,
	Windows: []*Window{{
		Homepage: "app/index.html",
		Options:  &astilectron.WindowOptions{},
	}},
})

if err != nil {
	panic(err)
}

@baerwang
Copy link
Author

omg,I didn't find the fix problem, thank you!!!

@baerwang baerwang closed this Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants