xylar
xylar

Reputation: 7663

Get the text value of a link via firefox context menu

How do I get the title of a link element when right clicking in firefox?

I can get the url using:

gContextMenu.linkURL

I have tried the following to get the value but it returns nothing.

gContextMenu.target.value

I can't see any other property that would help in the docs: http://developer.mozilla.org/en/XUL/PopupGuide/ContextMenus#Determining_what_was_Context_Clicked

Upvotes: 1

Views: 299

Answers (2)

Neil
Neil

Reputation: 55382

"Bookmark This Link" uses gContextMenu.linkText()

Upvotes: 0

xylar
xylar

Reputation: 7663

of course it should be: gContextMenu.target.innerHTML as the a element has no value attribute.

Upvotes: 2

Related Questions