Asynchronous scripts

Hello, does Grav asynchronous loading of scripts?

<div id="vk_api_transport"></div>
<script type="text/javascript">
  window.vkAsyncInit = function() {
    VK.init({
      apiId: APP_ID
    });
  };

  setTimeout(function() {
    var el = document.createElement("script");
    el.type = "text/javascript";
    el.src = "https://vk.com/js/api/openapi.js?136";
    el.async = true;
    document.getElementById("vk_api_transport").appendChild(el);
  }, 0);
</script>

This code does not work.
Thanks.

I don’t see how Grav would influence that at all. All Grav does is generate the HTML. Is that code making it to the final page?

As Perlkonig says, the JS you pasted creates an HTML <script> tag and fills the attributes. There is nothing that is Grav-related here.

Thank you for your attention. I think the same, but the example I took from the documentation from professional developers social network. A shorter version of the script, not asynchronous, it works. Just like the codes slow down the loading of the page.