View Full Version : Disable DOM Context Menus

Sep 3, 2013, 06:27 PM

I am looking for a way to toggle whether the oncontextmenu event by non-chrome Javascript can be set for a specific WebKit WebView in Cocoa.

In Firefox, you can go to about:config and set:

dom.event.contentmenu.enabled 's value to true or false.

I am looking for a way to do this in a subclass of a WebView inside my Cocoa app. I've looked through Documentation and several pages of Google. To my dismay, I haven't found anything that can help me out.

If anyone knows of a method to do this and is willing to share it, that would be great!