This PR also makes it possible change how HTML dependencies are rendered, by setting the following:
htmltools.html_dependency_render_mode = "json"
Normally HTML dependencies are not visible when a Tag/TagList calls .render(). However, if that value is set to "json", then HTML dependencies will be rendered into the document as something like this (note that the JSON has been prettified here, but normally is not):
The
HTMLTextDocument
class has a similar purpose toHTMLDocument
, except that its contents are loaded from an HTML file.It is meant to be used with https://github.com/posit-dev/py-shiny/pull/746
This PR also makes it possible change how HTML dependencies are rendered, by setting the following:
Normally HTML dependencies are not visible when a
Tag
/TagList
calls.render()
. However, if that value is set to"json"
, then HTML dependencies will be rendered into the document as something like this (note that the JSON has been prettified here, but normally is not):Then when the HTML is read in, the
HTMLDependency
object can be re-created like this: