In #188, we added the ability to specify <script> attributes with a list of values. However, it doesn't seem to support boolean attribites in the same way as other tags (i.e., div(foo=NA) gets rendered as <div foo></div>).
For example:
library(htmltools)
dep <- htmlDependency(
"foo", "1.0",
src = list(href = "foo/"),
script = list(src = "my.js", defer = NA)
)
renderDependencies(list(dep))
#> <script src="foo/my.js" defer="NA"></script>
BTW, the above seems to work in Chrome/Firefox, but it really should be rendered as
#> <script src="foo/my.js" defer></script>