tagAssert: Check that a tag has specific properties

View source: R/shinyYM-utils.R

tagAssertR Documentation

Check that a tag has specific properties

Description

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

Usage

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

## 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)

ymansiaux/shinyYM documentation built on March 20, 2022, 11:53 p.m.