I would need to know if the context menu has been opened for my JavaScript program.
I have to execute a function only when I see that the context menu is opened.
Could you help me?
I would need to know if the context menu has been opened for my JavaScript program.
I have to execute a function only when I see that the context menu is opened.
Could you help me?
 
    
     
    
    document.addEventListener('contextmenu', function() {
    console.log('ya right');
});
The above snippet logs ya right when the user right clicks.
