htmltools 0.5.2
Breaking Changes
- Closed #205: When calling
tagGetAttribute(x)
on an object with a non-atomic attribute, a list of untouched values will be returned. It is still recommended to only store character values inside attributes. (#212)
New Features & Improvements
-
{htmltools}
now has its own{pkgdown}
site hosted at https://rstudio.github.io/htmltools/. -
The new
tagQuery()
function provides a jQuery inspired interface to query and/or modify HTMLtag()
(e.g.,div()
) ortagList()
objects. To learn more, see the {pkgdown} article. (#208) -
Added
tagAddRenderHook()
for delaying modification of a tag object until it is rendered. A list of render-time hooks may also be added via the new.renderHook
argument added to alltag()
functions. (#215) -
Closed #243: Added
withTags(.noWS)
to change the default whitespace behavior for all tags within the call towithTags()
. (#245) -
Closed #251: Added
.cssSelector
parameters to tag modifying functions such astagAppendChildren()
ortagAppendChildren()
. The.cssSelector
allows you to target particular (inner) tags of interest. SeetagAppendChildren()
for examples. (#224) -
Closed #225: Added
tagInsertChildren()
to be able to insert child tag objects at a particular location. (#224)
Bug Fixes
-
When retrieving a tag attribute using
tagGetAttribute(tag, attr)
,NA
values will be removed before combining remaining attribute values. If all attribute values areNA
, then a singleNA
value will be returned. (#212) -
Closed #197: Fixed rendering of boolean attributes in
<script>
tags rendered viarenderDependencies()
(#197, thanks @atusy). -
Closed #222: Unnamed attributes are no longer allowed to be appended via
tagAppendAttribs()
. When trying to print unnamed tag attribs, a better error message is provided. (#229)