Closed toolness closed 8 years ago
Hmm, I'm actually not convinced this is a bug. Because the callback is executed in the context of an event listener on an iframe, it won't (AFAIK) be called if the iframe is removed from the DOM, which will happen when the preview is unmounted.
Ok, I'm pretty sure this isn't a bug, so I left a comment in the code saying as much, and will close this now.
See:
https://github.com/toolness/p5.js-widget/blob/master/lib/preview.tsx#L57-L63