An example of how to implement the PopupMenuAPI