/src/main/java/org/htmlunit/html/DomElement.java
if ( MouseEvent.TYPE_CONTEXT_MENU.equals( eventType)) {
if ( MouseEvent.TYPE_CONTEXT_MENU.equals ( eventType ) && getPage ( ) .getWebClient ( ) .getBrowserVersion ( ) .hasFeature ( EVENT_ONCLICK_USES_POINTEREVENT ) ) {
final SgmlPage page = getPage(); if (!page.getWebClient().isJavaScriptEnabled()) { return page; } final ScriptResult scriptResult; final Event event; <extra_id_0> event = new PointerEvent(this, eventType, shiftKey, ctrlKey, altKey, button, 0); } else { event = new MouseEvent(this, eventType, shiftKey, ctrlKey, altKey, button); } scriptResult = fireEvent(event);