Right Click Context menu webkit Htmlviewer Windows

Hello There !I see that when compiling for webkit HTMLViewer [Windows] has only 4 options available on right clickI am building a social network like application on the web (using PHP).I wanted to build a client Application for that using XOJOI see the Native Option has lot more options in its context menu (right click) then the webkit client. Including extensions like IDM installed on the browser, but is broken itself for the modern internet.Please help me add options like save image, video, audio etc. in my applicationI am building for Windows on Windows.I am a school student. Thanks !

This is actually no small task.

  1. You need to handle the contextmenu event with JavaScript. Be sure to cancel bubbling and prevent the default menu when needed (e.preventDefault();e.stopPropagation();). You can use HTMLViewer.ExecuteJavaScript after the document is loaded to do this.
  2. Then you can send whatever data you need back to the Xojo side using executeInXojo() which will raise the HTMLViewer.JavaScriptRequest event. What I’d expect is something like target type, target content, mouse position on page X, mouse position on page Y.
  3. You’d build your menu and perform operations on the resulting selection within the previously raised event.
1 Like

Thanks for your help !
You guys are really nice. So quick reply like a flash !

1 Like

Happy to be of service. Don’t forget to pick a solution!

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.