Is there a more foolproof method for determining if a DOM textnode represents a hyperlink? The code snippet below currently only checks if the node is directly enclosed in an anchor tag, which may not be sufficient if the <a>
element is higher up in the hierarchy...
if (myTextnode.parentNode.tagName !== 'A') {
//perform desired action
}