mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Fix: Do not generate bindings for OnBeforeClose
This commit is contained in:
@@ -25,7 +25,12 @@ type App struct {
|
||||
func (a *App) Run() error {
|
||||
|
||||
// Create binding exemptions - Ugly hack. There must be a better way
|
||||
bindingExemptions := []interface{}{a.appoptions.OnStartup, a.appoptions.OnShutdown, a.appoptions.OnDomReady}
|
||||
bindingExemptions := []interface{}{
|
||||
a.appoptions.OnStartup,
|
||||
a.appoptions.OnShutdown,
|
||||
a.appoptions.OnDomReady,
|
||||
a.appoptions.OnBeforeClose,
|
||||
}
|
||||
appBindings := binding.NewBindings(a.logger, a.appoptions.Bind, bindingExemptions)
|
||||
|
||||
err := generateBindings(appBindings)
|
||||
|
||||
@@ -185,7 +185,12 @@ func CreateApp(appoptions *options.App) (*App, error) {
|
||||
}
|
||||
|
||||
// Create binding exemptions - Ugly hack. There must be a better way
|
||||
bindingExemptions := []interface{}{appoptions.OnStartup, appoptions.OnShutdown, appoptions.OnDomReady}
|
||||
bindingExemptions := []interface{}{
|
||||
a.appoptions.OnStartup,
|
||||
a.appoptions.OnShutdown,
|
||||
a.appoptions.OnDomReady,
|
||||
a.appoptions.OnBeforeClose,
|
||||
}
|
||||
appBindings := binding.NewBindings(myLogger, appoptions.Bind, bindingExemptions)
|
||||
|
||||
err = generateBindings(appBindings)
|
||||
|
||||
@@ -84,7 +84,12 @@ func CreateApp(appoptions *options.App) (*App, error) {
|
||||
}
|
||||
|
||||
// Create binding exemptions - Ugly hack. There must be a better way
|
||||
bindingExemptions := []interface{}{appoptions.OnStartup, appoptions.OnShutdown, appoptions.OnDomReady}
|
||||
bindingExemptions := []interface{}{
|
||||
a.appoptions.OnStartup,
|
||||
a.appoptions.OnShutdown,
|
||||
a.appoptions.OnDomReady,
|
||||
a.appoptions.OnBeforeClose,
|
||||
}
|
||||
appBindings := binding.NewBindings(myLogger, appoptions.Bind, bindingExemptions)
|
||||
eventHandler := runtime.NewEvents(myLogger)
|
||||
ctx = context.WithValue(ctx, "events", eventHandler)
|
||||
|
||||
Reference in New Issue
Block a user