Desktop widget: programtically show an app

I am interested in the new desktop widget.
Can someone tell me how to programmtically show an app that is not pinned to the taskbar or desktop.


All apps are available in the desktop menu (click menu icon in the taskbar to show it).

To launch app programmatically you can call onDesktopAppClick event with an app id as a parameter.

const appId = "kanban";
app.callEvent("onDesktopAppClick", [appId]);

if Dekstop is initialized as a view, you can use $app property that refers to desktop app.

$$("desktop").$app.callEvent("onDesktopAppClick", [appId]);

Please check a sample: Code Snippet

Thank you Maria. I found onDesktopAppClick from desktop.js but didn’t know how to use it.
I wanted to attach a contextmenu to the desk rather than the shortcuts as shown in the sample contextmenu. Could you show me how to attach a contextmenu to the desk please.


You can try to attach the menu to the desk html container this.Tiles.$view