<div>
 <iframe src="{{ filename }}" id="{{ id }}" allowfullscreen="" width="100%" height="450px" frameborder="0">

{{ content }}

</iframe>


<script>
    let iframe_{{ id }} = document.getElementById("#{{ id }}");
let iframe = document.querySelector("#child-iframe");
    console.log(iframe_{{ id }});
    {# iframe_{{ id }}.onload(function(){
        console.log("coucou click");
    }); #}

    iframe_{{ id }}.addEventListener("readystatechange", function() {
        console.log("couou");
        iframe_{{ id }}.style.height = iframe.contentDocument.body.scrollHeight + 'px';
    });
</script>
</div>