DashWindowCloseListener is a Dash component library that allows you to listen to the browser window close event. This can be used to stop the Dash server when the user closes his window, which is useful when using Dash apps as part of a multi step a workflow.
This is illustrated in the following example:
Get started with:
- Install Dash and its dependencies:
pip install -r requirements.txt
(https://dash.plotly.com/installation) - Run
python usage.py
- Visit http://localhost:8050 in your web browser
- When closing the browser window, the dash server will stop.
See CONTRIBUTING.md