In the Chrome extension I'm working on right now, there's a situation where if the user right-clicked on this link:
<a href="http://www.google.com">Hello</a>
and selected a certain option from my extension's context menu, I need the string "Hello" to be captured in some form. As the Context Menus API shows, it's easy to capture text from a right-clicked selection or the actual URL of the hyperlink (in this case, Google.com) , since these appear in OnClickData, but I'm not sure how I would capture the text from a link.
As a side note, if a user highlights a hyperlink and tries to use my context menu, it doesn't work. However, it works properly if the user highlights normal text. I do have "link" and "selection" enabled under "contexts" when I create the context menu option.