1
0
Fork 0

Use strict in JS

This commit is contained in:
Mo 2022-10-29 13:11:46 +02:00
parent f4ca949726
commit 7dfa7966c1

View file

@ -30,10 +30,12 @@
{% block scripts %} {% block scripts %}
<script> <script>
let iframe = document.querySelector("#iframe"); "use strict";
iframe.addEventListener('load', function() { const iframe = document.querySelector("#iframe");
iframe.style.height = iframe.contentDocument.body.scrollHeight + 50 + 'px';
iframe.addEventListener("load", () => {
iframe.style.height = iframe.contentDocument.body.scrollHeight + 50 + "px";
}); });
</script> </script>
{% endblock %} {% endblock %}