Feature request: Please add info.linkText property to context menu click callback
Reported by
hnaka...@gmail.com,
Sep 18 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 Steps to reproduce the problem: 1. Create a chrome extension which creates a context menu. 2. Move a mouse cursor over a link and select the context menu for the extension. What is the expected behavior? I expect there is a way to get the link text. I expect the info object parameters in onClicked callback has the linkText property whose value is the text of the selected link. https://developer.chrome.com/extensions/contextMenus#event-onClicked What went wrong? Currently the info object parameters in onClicked callback does not provide a way to get the text of the selected link. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 61.0.3163.91 Channel: stable OS Version: 10.0 Flash Version: I create a extension to format the URL and the link text to the clipboard. https://chrome.google.com/webstore/detail/format-link/pocemhmkmchpgamlnocemnbhlcjcbjgg?hl=ja source: https://github.com/hnakamur/FormatLink-Chrome As a workaround, I search a link of the same URL, and use the text of the first link found. https://github.com/hnakamur/FormatLink-Chrome/blob/d8e69f6df205642412684bf9b97e344f63b97ea8/background.js#L20-L35 However if there are multiple links of the same URL in the page, the first link may be different from the selected link. FYI, Firefox webextension API does have the linkText property in the info object. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/menus/OnClickData
,
Oct 20 2017
This seems pretty reasonable. catmullings@ has been making changes in the contextMenus api lately.
,
Feb 8 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ranjitkan@chromium.org
, Sep 19 2017Components: Platform>Extensions
Status: Untriaged (was: Unconfirmed)