Onshow event
JavaScript is performed when the element is displayed in the context menu:
<p>Right-click inside this box to see the context menu!
Right-click on the yellow box area to view the context menu! </p>
slt;menuitem label "refresh" onclick "window.location.reload(); "></menuitem>
</menu>
</div>
Try it out . . .
Definitions and usages
The onshow event is triggered when the element is displayed in the context menu.
Browser support
The numbers in the table support the version number of the first browser for the event.
Event | |||||
---|---|---|---|---|---|
onshow | Not supported | Not supported | 8.0 | Not supported | Not supported |
Grammar
In HTML:
In JavaScript:
In JavaScript, use the addEventListener() method:
Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions of IE.
Technical details
Whether to support bubbling: | No |
---|---|
Can I cancel: | No |
Types of events: | Event |
Supported HTML tags: | <menu> |
Related pages
HTML Reference Manual: HTML contextmenu property
HTML Reference Manual: HTML slt;menu.gt; Tags
The event object