I tried to put my menu functions inside a module like this:
var mainmenuModule = function() {
return {
menuItemX: function() {...},
menuItemY: function() {...}
};
}();
But when I create a menu item, my function is not found:
{ name: "X", functionName: "mainMenuModule.menuItemX"}
I’m doing this inside a Spreadsheet container.
You can’t currently do this but I see that Issue 1355 has been logged as an enhancement to support this for libraries. You can “star” the issue to receive updates.