mirror of https://github.com/zulip/zulip.git
templates: Defer all script execution.
This allows parsing and resource loading to continue in parallel with script fetching. It also means we don’t need to concern ourselves with explicitly waiting for the DOM to become ready. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
9b38bcc2a6
commit
f1ecd3c18b
|
@ -28,7 +28,8 @@
|
|||
{% endblock %}
|
||||
|
||||
{% macro bundle(name) %}
|
||||
{{ render_bundle(name, attrs='nonce="%s"' % (csp_nonce,) if csp_nonce else '') }}
|
||||
{{ render_bundle(name, 'css', attrs='nonce="%s"' % (csp_nonce,) if csp_nonce else '') }}
|
||||
{{ render_bundle(name, 'js', attrs='defer nonce="%s"' % (csp_nonce,) if csp_nonce else 'defer') }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- This is a temporary block to enable webpack transition
|
||||
|
|
Loading…
Reference in New Issue