-
Notifications
You must be signed in to change notification settings - Fork 5
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
[feature] singleton function - htmltools::singleton #42
Comments
Have you come across |
Thanks for the quick answer. So the market standard is that most often styles are located at the head but the javascript code at the body (usually bottom). I do not see a sibling body_content function so how I could protect myself against repeated body calls which comes from e.g. a separate module (which could be called many times). |
Good point. From what I understand, the convention for placing JS code towards the bottom of the body is mostly (entirely?) to guarantee that the code executes after the DOM is ready, but that can also be done by adding a
For now this seems like a good idea/recommendation, but let's also keep in mind that once we have posit-dev/py-shiny#127, most users won't need to know about |
I think the
htmltools::singleton
functionality is very useful, especially when developing shiny modules.Please consider adding it in the python version.
The text was updated successfully, but these errors were encountered: