Implementing context menus
The global attribute contextmenu
used to be in the specification, implemented within menu
and the now deprecated menuitem.
The related event oncontextmenu
can be listened to as replacement,
with event.preventDefault()
to block the native context menu.
Hotkeys mapped to the context-menu actions
may be implemented via accesskey
Discouraged (i18n issues, inconsistent agent implementations).
Firefox uses Ctrl+Shift+Key on Windows and Linux.
Context-menus are themselves discouraged,
as opaque interface elements with poor cross-platform
support.
Relevant for limited uses in single-page applications.
Web extensions use dedicated
Context Menu API.