When I try to add menuitems to a webview with this code:
my_webview.connect('context-menu', Lang.bind(this, function(webview, c_menu, event, hit_test){
var action = new Gtk.Action({name:"some_name", label:"Some Label"});
action.connect('activate', Lang.bind(this, function(){
print("Your Menu Item !");
}))
var m_item = new WebKit.ContextMenuItem(action);
c_menu.append(m_item);
m_item.show();
return false;
}));
the app exit with the error "Segmentation fault (core dumped)" What's the correct way to add a menuitem to the context menu of a WebView ?