0

Is there a way to use javascript to programmatically get the context menu items that are available when a right click event is generated within a browser.

For example in Chrome be able to have an array filled with the following: Back,Forward,Reload,Save as, Print, Translate to English, View page source, View page info and so on.

Is it possible to get such values without the need for generating a right click event so the context menu doesn't appear on the user's browser?

Thanks

1 Answer 1

1

No, there is no way to get them. This would be a security issue, as extensions can add items to that menu and if you can get the menu entries with JavaScript, you can figure out if user is using a particular extension. The only thing you are allowed to do with the context menu is to stop it from showing. Hope that helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I thought so as the context menu is at the application level and not exposed at the javascript level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.