Fixed evaluation of third-party scripts when using instant loading

This commit is contained in:
squidfunk 2021-03-07 19:04:17 +01:00
parent 66a6713523
commit b6779114b0
4 changed files with 7 additions and 6 deletions

View File

@ -217,7 +217,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.6946554b.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.5cf3e710.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}

View File

@ -304,7 +304,8 @@ export function setupInstantLoading(
concatMap(el => {
const script = createElement("script")
if (el.src) {
script.src = el.src
for (const name of el.getAttributeNames())
script.setAttribute(name, el.getAttribute(name)!)
replaceElement(el, script)
/* Complete when script is loaded */