Shortcut to open snap menu

 From:  ttype (STRUBE)
7277.3 In reply to 7277.2 
Wow, nice, I hadn't been able to find the "moi:xxx" elements either.

But, of course, the same had to be tested for the file menu:
code:
moi.ui.showMenu( 'FileMenu.htm', moi.ui.commandBar.document.getElementsByTagName( 'moi:CommandMenuButton' )[0], 2, 0 );


And it looks somewhat unfinished:


Can I perhaps make it look like this:


What I tried is stuff like this:
code:
var elem = moi.ui.commandBar.document.getElementsByTagName( 'moi:CommandMenuButton' )[0];

var evt = new MouseEvent("click", {
    bubbles: true,
    cancelable: true,
    view: window,
});

elem.dispatchEvent(evt);


But it keeps saying "'MouseEvent' ... is not a constructor.", which seems to be a bug in Qt4 Webkit. (Which also happens for "Event".)