# NOT RUN {
app <- dash_app()
# Add a single script with URL
app %>% add_script("https://stackpath.bootstrapcdn.com/bootstrap/4.4.0/js/bootstrap.min.js")
# Add multiple scripts with URL
app %>% add_script(list(
"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
))
# Add a single script with a list
app %>% add_script(
list(
href = "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js",
integrity = "sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
)
)
# Add multiple scripts with both URL and list
app %>% add_script(
list(
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js",
"https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js",
list(
href = "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js",
integrity = "sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
)
)
)
# }
Run the code above in your browser using DataLab