Asynchronous scripts

Hello, does Grav asynchronous loading of scripts?

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

  setTimeout(function() {
    var el = document.createElement("script");
    el.type = "text/javascript";
    el.src = "";
    el.async = true;
  }, 0);

This code does not work.

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.