title: How to check if DOM reference has been destroyed?
body: <p>Say I select an element the old fashioned way (<em>or any other way by which a DOM reference might be obtained</em>):</p>
  
  <pre><code>var el = document.getElementById('myFavoriteElement');
  </code></pre>
  
  <p>Then I remove that element's parent from the DOM, thus removing <code>el</code> as well. Or I just remove <code>el</code> directly.</p>
  
  <p>Is there a way to check whether <code>el</code> is still a valid reference, whether the HTML to which it refers still exists in the DOM? Something along the lines of <code>el.hasBeenDestroyed</code> as a boolean attribute, or something like that?</p>