Skip to content
Myr

Update javascript.rst

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Spelling

authored by tautv · committed by GitHub · parent a1c478b · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/patterns/javascript.rst+1 added-1 removed
26 unmodified lines
27It is important to understand the difference between templates and28JavaScript. Templates are rendered on the server, before the response is29sent to the user's browser. JavaScript runs in the user's browser, after30the template is rendered and sent. Therefore, it is impossible to use31JavaScript to affect how the Jinja template is rendered, but is is31JavaScript to affect how the Jinja template is rendered, but it is32possible to render data into the JavaScript that will run.3334To provide data to JavaScript when rendering the template, use the35:func:`~jinja-filters.tojson` filter in a ``<script>`` block. This will
224 unmodified lines