If we have a code like
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="highest_level_parent">
<div class="inner">
<a href="#!">Some link</a>
</div>
</div>
<script>
document.getElementsByTagName('a')[0].addEventListener('click', function(){
alert(this.highestLevelParent.className); // it's an example, of course there is no the highestLevelParent property in JS
});
</script>
</body>
</html>
and click the link, how can we get in pure JS the highest level parent of the clicked link i.e. <div class="highest_level_parent">
?
I mean if we don't know how many levels of nesting are and don't know the class of the highest level parent. And it must work in IE11.
ps. The highest level parent with regard to the <body>