View source: R/shinyYM-utils.R
tagAssert | R Documentation |
Check for type and class. Raise an error if the conditions are not fulfilled. This function is borrowed from shinydashboard.
tagAssert(tag, type = NULL, class = NULL, allowUI = TRUE)
tag |
Tag to check. |
type |
Expected type. |
class |
Expected class. |
allowUI |
? |
An error if conditions are not met
## Not run: library(shiny) myTag <- div(class = "bg-blue") tagAssert(myTag, type = "div") tagAssert(myTag, type = "li") # will fail tagAssert(myTag, class = "bg-blue") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.