Called on a popup element, this event carries out some code before the popup appears. It can be useful for dynamically determining which items appear in the resulting menu.