A prop that takes a function – a table's formatter, a tree's
filter_node_method, a date picker's shortcuts – takes JavaScript source
marked with JS(), which the page evaluates rather than passing on as
text. It is the same mark htmlwidgets::JS() makes, so either works, and
so does DT::JS().