diff --git a/src/reactpy/executors/asgi/pyscript.py b/src/reactpy/executors/asgi/pyscript.py index 20a094cb7..23d1db936 100644 --- a/src/reactpy/executors/asgi/pyscript.py +++ b/src/reactpy/executors/asgi/pyscript.py @@ -17,8 +17,8 @@ pyscript_component_html, pyscript_setup_html, ) -from reactpy.executors.utils import vdom_head_to_html -from reactpy.types import ReactPyConfig, VdomDict +from reactpy.executors.utils import html_noscript_to_html, vdom_head_to_html +from reactpy.types import Component, ReactPyConfig, RootComponentConstructor, VdomDict class ReactPyCsr(ReactPy): @@ -32,6 +32,11 @@ def __init__( initial: str | VdomDict = "", http_headers: dict[str, str] | None = None, html_head: VdomDict | None = None, + html_noscript: str + | Path + | Component + | RootComponentConstructor + | None = "Enable JavaScript to view this site.", html_lang: str = "en", **settings: Unpack[ReactPyConfig], ) -> None: @@ -59,6 +64,9 @@ def __init__( commonly used to render a loading animation. http_headers: Additional headers to include in the HTTP response for the base HTML document. html_head: Additional head elements to include in the HTML response. + html_noscript: String, Path to an HTML file, or component rendered to HTML + inside a `