if (FALSE) {
# Register an input handler which rounds a input number to the nearest integer
# In a package, this should be called from the .onLoad function.
registerInputHandler("mypackage.validint", function(x, shinysession, name) {
if (is.null(x)) return(NA)
round(x)
})
## On the Javascript side, the associated input binding must have a corresponding getType method:
# getType: function(el) {
# return "mypackage.validint";
# }
}
Run the code above in your browser using DataLab