We would like to know how to get part of parent node's content.
<!DOCTYPE html>
<html>
<body>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
<a onclick="console.log(this.parentNode.innerHTML.substring(0, 20))" href="#">Some
Link</a> industry.
</p>
</body>
</html>
The code above is rendered as follows: