I have a .js file with n number of javascript functions and an .r file with observeEvent.
I would like to call a function from .js file into .r file. But I don't feel it's not working properly
filename : main.js
function dR(id){
decode = atob(id);
Shiny.onInputChange("example", reportDecode, {priority: "event"});
return this.decode
}
filename: server.r
observeEvent(input$example, {
js_code = paste0("dR('", input$report_id, "');")
a <- runjs(js_code)
}