test_that("turbo modifiers work", {
expect_equal(
tag_get_attribute(turbo_enable(tags$div()), "data-turbo"),
"true"
)
expect_equal(
tag_get_attribute(turbo_disable(tags$div()), "data-turbo"),
"false"
)
expect_equal(
tag_get_attribute(turbo_target(tags$div(), "hello"), "data-turbo-frame"),
"hello"
)
expect_equal(
tag_get_attribute(turbo_noeval(tags$script()), "data-turbo-eval"),
"false"
)
expect_true(
tag_has_attribute(turbo_permanent(tags$div(id = "a")),
"data-turbo-permanent")
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.