Skip to content

pywry.scripts

JavaScript initialization script builder.


pywry.scripts.build_init_script

build_init_script(window_label: str, enable_hot_reload: bool = False) -> str

Build the core initialization script for a window.

This builds the CORE JavaScript bridges: - pywry bridge (emit, on, result, etc.) - theme manager - event bridge - toolbar bridge - cleanup handler - hot reload (optional)

NOTE: Plotly and AG Grid defaults are loaded separately via templates.py's build_plotly_script() and build_aggrid_script() functions, which include the library JS AND the defaults JS together.

PARAMETER DESCRIPTION
window_label

The label for this window.

TYPE: str

enable_hot_reload

Whether to include hot reload functionality.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
str

The combined JavaScript initialization script.