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".)
|