A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://rstudio.github.io/htmltools/reference/tagQuery.html below:

Query and modify HTML tags — tagQuery • htmltools

tagQuery() provides a jQuery inspired interface for querying and modifying tag() (and tagList()) objects.

Value

A class with methods that are described below. This class can't be used directly inside other tag() or a renderTags() context, but underlying HTML tags may be extracted via $allTags() or $selectedTags().

Altered Tag structure

For performance reasons, the input tag structure to tagQuery() will be altered into a consistently expected shape.

Some alterations include:

While the resulting tag shape has possibly changed, tagQuery()'s' resulting tags will still render to the same HTML value (ex: renderTags()) and HTML dependencies (ex: findDependencies()).

Methods

Unless otherwise stated, tagQuery() methods accept a character vector as input.

Query methods

Query methods identify particular subsets of the root tag using CSS selectors (or R functions).

Children Siblings Parents Custom filter Length Reset Modify methods

Unlike query methods, modify methods modify the tagQuery() object.

Attributes Children Siblings Custom Replace methods Examples
tagQ <- tagQuery(div(a()))
tagQ$find("a")$addClass("foo")
#> `$allTags()`:
#> <div>
#>   <a class="foo"></a>
#> </div>
#> 
#> `$selectedTags()`:
#> [[1]]
#> <a class="foo"></a>
#> 
tagQ
#> `$allTags()`:
#> <div>
#>   <a class="foo"></a>
#> </div>
#> 
#> `$selectedTags()`: `$allTags()`

# To learn more, visit https://rstudio.github.io/htmltools/articles/tagQuery.html

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4