Proposal: add commands.OnCommandData similar to menus.OnClickData #568
Labels
follow-up: chrome
Needs a response from a Chrome representative
needs-triage: firefox
Firefox needs to assess this issue for the first time
supportive: safari
Supportive from Safari
A sticking point with adding shortcut keys at the moment is the lack of information provided to the extension when onCommand is called.
My use case involves storing selected text or inputting data into a field when the user requests it. In order to limit the permissions required, my app only requests the activeTab permission with
<all_urls>
specified underoptional_host_permissions
. When a user clicks an item in the contextmenu, my service worker is provided with an OnClickData object I can use to handle embedded frames by:Without this information and no reliable way of getting a frameId from the parent page, extensions are required to:
At least for my use case, commands including a data object similar to the one for menus would mean less need for additional permissions and workarounds, as well as less friction for users. I imagine there will be use cases for many of the other fields exposed in OnClickData as well.
The text was updated successfully, but these errors were encountered: