mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed evaluation of third-party scripts when using instant loading
This commit is contained in:
parent
66a6713523
commit
b6779114b0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -217,7 +217,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% 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"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -304,7 +304,8 @@ export function setupInstantLoading(
|
|||||||
concatMap(el => {
|
concatMap(el => {
|
||||||
const script = createElement("script")
|
const script = createElement("script")
|
||||||
if (el.src) {
|
if (el.src) {
|
||||||
script.src = el.src
|
for (const name of el.getAttributeNames())
|
||||||
|
script.setAttribute(name, el.getAttribute(name)!)
|
||||||
replaceElement(el, script)
|
replaceElement(el, script)
|
||||||
|
|
||||||
/* Complete when script is loaded */
|
/* Complete when script is loaded */
|
||||||
|
Loading…
Reference in New Issue
Block a user