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

Add include_javascript(), include_css(), and include_html() #127

Merged
merged 16 commits into from
May 17, 2023
Prev Previous commit
Next Next commit
Typing
Gordon Shotwell committed May 12, 2023
commit 5427d77c70b0edd088862b7f0049793a0e340d0a
7 changes: 5 additions & 2 deletions shiny/ui/_include_helpers.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
import tempfile

# TODO: maybe these include_*() functions should actually live in htmltools?
from htmltools import HTMLDependency, Tag, tags
from htmltools import HTMLDependency, Tag, TagAttrValue, tags

from .._docstring import add_example
from .._typing_extensions import Literal
@@ -20,7 +20,10 @@

@add_example()
def include_js(
path: str, *, method: Literal["link", "link_files", "inline"] = "link", **kwargs
path: str,
gshotwell marked this conversation as resolved.
Show resolved Hide resolved
*,
method: Literal["link", "link_files", "inline"] = "link",
**kwargs: TagAttrValue,
) -> Tag:
"""
Include a JavaScript file