How to know when an element is removed

How to know when an element is removed

I'm really excited that cleanData is exposed.  I can overwrite it to let me know when an element is removed.  However, I'm wondering if this is the expected way.


I notice that each event.remove is called in cleanData.  Is it expected / possible to use custom events to callback a function, letting something know that the element has been removed?

I'm going to experiment later today with this.  But I'm hoping there's already an answer.