Set up beforeunload event handler in BPlayerMain
Set up beforeunload event handler in BPlayerMain

uses a Signal and an AsyncStack to build a list of tasks to be run asynchronously before closing the window. Tasks are run and then the window is closed as normal
DavisDevelopment/pman,DavisDevelopment/pman