// entries are HTML (e.g. links) sS hPopDownButton(S... entries) { S id = "dropdown-" + aGlobalID(); ret hdiv( p(htmlEncode2(unicode_smallDownPointingTriangle())) + hdiv(ul(entries), id := jsQuote(id)), style := "position: relative; display: inline-block; cursor: context-menu", onclick := replaceDollarVars([[ var x = document.getElementById($id); x.style.display = x.style.display === "none" ? "block" : "none"; ]])); }