This event occurs after the moment when a contextual menu appears by a right mouse click. onAfterContextMenu event can call a user-defined handler (if there is any) and pass the following parameter:
menu.attachEvent("onAfterContextMenu", function(zoneId){});