jupyter-require
jupyter-require copied to clipboard
Cell cleanup on deletion or re-execution
Description
Could JS run to create output be given the opportunity to clean up on cell deletion or re-execution?
Additional context
In the readme the topic of finalization is brought up, particularly:
Then, every time a cell is copied or re-created (i.e., on notebook reload), the script is executed. Dies jupyter-require do anything about this issue? I'm interested in cells getting to clean up resources (clearing timers, removing event listeners) on cell reexecution or deletion.
Are you thinking about this topic?
That's an interesting point, @thomasballinger . I suppose there would be a way to allow for custom hooks on deletion and re-execution.