Onshow event

onshow incident The event object

JavaScript is performed when the element is displayed in the context menu:

<div contextmenu="mymenu">
<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:

< element onshow=" myScript "> Give it a try

In JavaScript:

object .onshow=function(){ myScript }; Give it a try

In JavaScript, use the addEventListener() method:

object .addEventListener("show", myScript ); Give it a try

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


onshow incident The event object