Wrap autoload script's contents in a closure
@@ -25,6 +25,7 @@ ID is not specified, the entire document will be rendered.
#}
<script id="{{ elementid }}">
+ (function() {
const xhr = new XMLHttpRequest()
xhr.responseType = 'blob';
xhr.open('GET', "{{ src_path }}", true);
@@ -38,4 +39,5 @@ ID is not specified, the entire document will be rendered.
document.body.appendChild(script);
};
xhr.send();
+ })();
</script>
