tagAssert: Check that a tag has specific properties

Description Usage Arguments Value Examples

View source: R/shinyRPG-utils.R

Description

Check for type and class. Raise an error if the conditions are not fulfilled. This function is borrowed from shinydashboard.

Usage

1
tagAssert(tag, type = NULL, class = NULL, allowUI = TRUE)

Arguments

tag

Tag to check.

type

Expected type.

class

Expected class.

allowUI

?

Value

An error if conditions are not met

Examples

1
2
3
4
5
6
7
8
## 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)

RinteRface/shinyRPG documentation built on July 17, 2021, 10:37 p.m.