I'm learning JavaScript and I learned about the Node.parentNode property, which simply returns the parent of the current node. However, JavaScript also has another property called Node.parentElement, which seems like the same thing. I found out from this question that the difference is that parentElement will return null if the parent node is not an element.
I understand the difference between the two, but I can't imagine this ever being useful. Is it ever good practice to use parentElement instead of parentNode? If not, why does it exist?
Edit: The question I have linked is similar, but not the same as my question, because it is asking how the two properties behave differently. I know the difference, but I want to know what the actual purpose is of ever using parentElement, or if it's pretty much always bad practice and we should all agree to ignore parentElement. This specific question - the 'why' rather than the 'what' - was not answered here.