Closed Bug 1418424 Opened 7 years ago Closed 6 years ago

menus.OnClickData should have the imageText property

Categories

(WebExtensions :: Frontend, enhancement, P5)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kernp25, Unassigned)

References

Details

(Whiteboard: [design-decision-denied][menus])

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20171114220116



Actual results:

No imageText [1] in menus.OnClickData [2].

[1] https://searchfox.org/mozilla-central/source/browser/modules/ContextMenu.jsm#819
[2] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/menus/OnClickData


Expected results:

It would be helpful, if the menus.OnClickData [1] could have the imageText property [2]. This allows WebExtensions to get the text (e.g. title or alt text) from the image.

Then a WebExtension could, for example, copy the image text to the clipboard.

[1] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/menus/OnClickData
[2] https://searchfox.org/mozilla-central/source/browser/modules/ContextMenu.jsm#819
Severity: normal → enhancement
Priority: -- → P5
Whiteboard: [design-decision-needed]
At the moment, the value of an image's alt-attribute is included in both menus.OnClickData.linkText and menus.OnClickData.selectionText.

As developer of an add-on[1] that copies the link text and location to the clipboard, it would be nice to have imageText available, to add better support for copying images.

[1] https://addons.mozilla.org/en-US/firefox/addon/link-text-and-location-copier/
Does Bug 1325814 provide access to the imageText via a CSS selector?
Flags: needinfo?(kernp25)
Flags: needinfo?(evilnickname)
Whiteboard: [design-decision-needed] → [design-decision-pending][menus]
I agree that, we can use a content script for this.
Flags: needinfo?(kernp25)
Thanks, kernp25.  Marking this as a wontfix and referring to Bug 1325814.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(evilnickname)
Resolution: --- → WONTFIX
See Also: → 1325814
Whiteboard: [design-decision-pending][menus] → [design-decision-denied][menus]
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.