From Firefox 60 onward, https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/commands/update allows to change the commands
definitions made in the manifest (which is pretty neat).
What I can’t figure out is how I can remove a previously set shortcut.
update()
allows to set a .shortcut
, but setting it to null
doesn’t change anything (and ""
either throws or is noop as well).
If the manifest entry doesn’t specify a shortcut in the first place, reset()
can be used to revert to that state.
But if it does specify a shortcut, I see no way to remove it dynamically.
Am I missing something or is this a bug / oversight in the API?
Oh, and adding/removing command definitions isn’t implemented yet.