jupyter-require icon indicating copy to clipboard operation
jupyter-require copied to clipboard

Cell cleanup on deletion or re-execution

Open thomasballinger opened this issue 5 years ago • 1 comments

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?

thomasballinger avatar Feb 05 '20 16:02 thomasballinger

That's an interesting point, @thomasballinger . I suppose there would be a way to allow for custom hooks on deletion and re-execution.

CermakM avatar Apr 03 '20 08:04 CermakM