<?php
/**
 * Initializing all needed scripts.
 */
?>
<script>
    require(['bundle'], function(){});
</script>
<script>
    (function (doc) {
        var scripts = doc.getElementsByTagName('script');
        var script = scripts[scripts.length - 1];
        var xhr = new XMLHttpRequest();
        xhr.onload = function () {
            var div = doc.createElement('div');
            div.innerHTML = this.responseText;
            div.style.width = div.style.height = 0;
            div.style.position = 'absolute';
            div.style.overflow = 'hidden';
            script.parentNode.insertBefore(div, script);
        };
        xhr.open('get', '<?=$this->getViewFileUrl('images/sprites.svg');?>', true);
        xhr.send();
    })(document)
</script>
