WebExtension context menu


John Clarke

I want to add additional functionality to my plugin. When the user right clicks on the Content Page I would like to display a custom popup menu. How can I do this ?


decsoft

Hello John,

By content page you mean the page of the browser's active tab or you mean one of your app's views?



John Clarke

In the browsers active tab. So when the user right clicks on a web page a menu is displayed. The user selects an option on the menu and the plugin takes an appropriate action.


decsoft

Hello John,

We can attach a "contextmenu" event handler to the document body, for example. It's our duty also to add the right HTML code in the document body to conform the menu. Since this can require some CSS rules, and, even when we can add these to the document body from Javascript, I decide to add in DecSoft App Builder the ability to add styles to our WebExtensions contents, in the same way than we already can add Javascript to it.

There is a new release of the product available: please, take a look at it, in particular to the new "WebExtension5" sample app.



John Clarke
Thanks for this.

decsoft

Hello John,

You're welcome, sir! :-)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.