Listen for exit event


I was wondering if the app.exit() event is exposed in any way? app itself is inaccessible from inside a package but I was wondering if there is any solution that works? Like ‘app:will-exit’ or something similar?

Currently I’m using $(window).on ‘beforeunload’ but I’d rather subscribe to the exit event


There was some discussion around a quit or exit event here:

Including a hack to add a quit confirmation. Perhaps that would help?