Merge pull request #1247 from Hixie/menu

Introduce a showPopupMenu() function