Let's say I select an element in the old-fashioned way (or in any other way with which to get the DOM link):
var el = document.getElementById('myFavoriteElement');
Then I remove the parent from the DOM, thereby removing el . Or just delete el directly.
Is there a way to check if el is still a valid link, is the HTML it refers to still exist in the DOM? Something along the lines of el.hasBeenDestroyed as a boolean attribute or something like that?
source share