wails/v3/pkg/events
Lea Anthony 68b12d4fff
Refactored application shutdown process to streamline app termination.
The application shutdown process has been significantly reworked to be more efficient and robust. The refactored code removes the event listener for the 'ApplicationTerminate' event. Instead, an in-process flag is added to the 'Quit' method to prevent recursive calls. Additionally, an optional 'OnShutdown' function variable is introduced to allow custom cleanup operations upon app termination.
2024-01-09 18:19:09 +11:00
..
defaults.go [v3 windows] Fix WindowClose defaults 2023-07-08 20:28:19 +10:00
events.go Refactored application shutdown process to streamline app termination. 2024-01-09 18:19:09 +11:00
events.h [darwin] add support for quitting app 2024-01-08 21:22:33 +11:00
events.txt Refactored application shutdown process to streamline app termination. 2024-01-09 18:19:09 +11:00
events_darwin.go [darwin] Disable listener caching. Run execJS on main thread. 2023-10-07 20:08:22 +11:00
events_darwin.h Improve window teardown on termination 2024-01-09 07:45:56 +11:00
README.md Add events README.md 2023-10-25 20:17:41 +11:00

Events

This package is used to generate the event management code and to allow quick addition of events.

Usage

  1. Add events to events.txt
  2. Run task generate:events

Notes

For events that you want to handle manually, add a ! to the end of the event name and add custom code into the appropriate platform. See this PR for an example of how to do this.