قرینه از
https://github.com/matomo-org/matomo.git
synced 2025-08-21 22:47:43 +00:00

* Allow to optionally defer JS from custom layout templates * Use DOMContentLoaded event in iframeBuster * Use DOMContentLoaded event in piwikHelper * Remove posting of Matomo.afterInitialVueEntryProcess event * Tweak mechanism to wait for jQuery to be available * Remove superfluous anonymous function * Remove waiting for jQuery as it should be ready when DOMContentLoaded is triggered * Remove jQuery dependency from iframe buster * Use `var` instead of `const` in iframe buster * Add replace pattern to keep defer attribute while supporting cache busting param * Move less specific defer line after more specific chunked files defer line * Remove defer option when assets are not merged as not relevant there Using the defer attribute when assets are not merged can cause order-related issues. * Correctly handle URLs with query params using defer Co-authored-by: Stefan Giehl <stefan@matomo.org> --------- Co-authored-by: Stefan Giehl <stefan@matomo.org>
14 خطوط
519 B
Twig
14 خطوط
519 B
Twig
<div class="{{ cssIdentifier }} {{ cssClass }}"
|
|
{% for name,value in htmlAttributes %}
|
|
{{ name }}="{{ value|e('html_attr') }}"
|
|
{% endfor %}
|
|
data-props="{{ clientSideProperties|json_encode }}"
|
|
data-params="{{ clientSideParameters|json_encode }}">
|
|
{% render implView with implOverride %}
|
|
</div>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
$(document).ready(function () { require('{{ jsNamespace }}').{{ jsClass }}.initElements(); });
|
|
}, false);
|
|
</script>
|