The MenuItem that was the target of the click event will be sent back in
the arguments array that is passed back to your handler. This is
covered in this section of the Menu landing page:
Jack Bates wrote:
> When a sub menu item is clicked, how can I get that menu item?
> I applied a "click" event handler to a menu button in order to change
> the button label when a menu item is selected:
> button.getMenu().subscribe('click', function (event)
> It works for simple menu items, but not for sub menu items:
> In this test case, selecting either "AAA" or "CCC" will correctly change
> the button label. However selecting the "BBB" sub menu item incorrectly
> changes the button label to "AAA"
> How can I get the sub menu item which was clicked, so I can set the
> button label to "BBB" when "BBB" is selected?
> Thanks and best wishes, Jack