title: DOM event when element is removed
body: <p>Is there any way to get notification when an element is removed from the DOM, either directly <strong>or as part of a subtree</strong>? It seems like the only methods available are just for directly removed nodes, but I would like to get a notification when a whole subtree that contains my node is removed.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Seems the problem wasn't entirely clear, so I have made a challenge: <a href="https://jsbin.com/winukaf" rel="noreferrer">https://jsbin.com/winukaf</a></p>
  
  <p>The DOM looks like this:</p>
  
  <pre><code>&lt;body&gt;
    &lt;div class="root"&gt;
      &lt;div class="great-grand-parent"&gt;
        &lt;div class="grand-parent"&gt;
          &lt;div class="parent"&gt;
            &lt;div class="leaf"&gt;
              Am I still here?
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>and the challenge is to notify when any one of the elements here are removed, since that will remove the leaf node from the DOM tree. </p>