Execute a JavaScript when a <menu> element is shown as a context menu:
The onshow event occurs when a <menu> element is shown as a context menu.
The numbers in the table specify the first browser version that fully supports the event.
Event | |||||
---|---|---|---|---|---|
onshow | Not supported | Not supported | 8.0 | Not supported | Not supported |
In HTML:
In JavaScript:
In JavaScript, using the addEventListener() method:
Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.
Bubbles: | No |
---|---|
Cancelable: | No |
Event type: | Event |
Supported HTML tags: | <menu> |
DOM Version: | Level 3 Events |
HTML reference: HTML contextmenu attribute
HTML reference: HTML <menu> tag