Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach metadata about HTMLDependency()'s in the rendered document #22

Merged
merged 4 commits into from
Mar 3, 2022

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Mar 2, 2022

This matches what we do in htmltools::renderDocument() so that shiny.js is able to pick up on what dependencies have been statically renderred (and thus, know not to render them again dynamically)

This is needed for/discovered via posit-dev/py-shiny#90

Also closes #23

@cpsievert cpsievert requested review from jcheng5 and wch and removed request for jcheng5 March 2, 2022 19:09
htmltools/_util.py Outdated Show resolved Hide resolved
@wch
Copy link
Collaborator

wch commented Mar 3, 2022

In the head_content docstring, it would help to have some technical info about:

  • How it uses the HTML dependency mechanism
  • How that means that the same content won't show up multiple times in <head>

And maybe add a code comment about how we could add that capability in the future, if we find that it's useful.

@cpsievert cpsievert merged commit a78b32a into main Mar 3, 2022
@cpsievert cpsievert deleted the application-html-dependencies branch March 3, 2022 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

head_content() doesn't produce dependencies of the same name across python processes
2 participants