tagMatches: Check that tag has specific properties

View source: R/shinyYM-utils.R

tagMatchesR Documentation

Check that tag has specific properties

Description

Return TRUE if a tag object matches a specific id, and/or tag name, and/or

Usage

tagMatches(item, ..., id = NULL, name = NULL, class = NULL)

Arguments

item

Tag to validate.

...

Any attribute to check (must be named).

id

Expected id.

name

Expected name.

class

Expected class.

Value

TRUE or FALSE, depending on the test result.

Examples

## Not run: 
 library(shiny)
 myTag <- div(class = "bg-blue")
 tagMatches(myTag, id = "d")
 tagMatches(myTag, class = "bg-blue")

## End(Not run)

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